github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/dli/v2/spark/resources/results.go (about) 1 package resources 2 3 // Group is a object that represents the group create or group list operations. 4 type Group struct { 5 // Module name. 6 GroupName string `json:"group_name"` 7 // Status of a package group to be uploaded. 8 Status string `json:"status"` 9 // List of names of resource packages contained in the group. 10 Resources []string `json:"resources"` 11 // Details about a group resource package. 12 Details []Detail `json:"details"` 13 // UNIX timestamp when a package group is uploaded. 14 CreateTime int `json:"create_time"` 15 // UNIX timestamp when a package group is updated. 16 UpdateTime int `json:"update_time"` 17 // Whether to upload resource packages in asynchronous mode. 18 // The default value is false, indicating that the asynchronous mode is not used. 19 // You are advised to upload resource packages in asynchronous mode. 20 IsAsync bool `json:"is_async"` 21 // Owner of a resource package. 22 Owner string `json:"owner"` 23 // The description, moduleName and moduleType are supported by function response of specified file upload. 24 // Description of a resource module. 25 Description string `json:"description"` 26 // Name of a resource module. 27 ModuleName string `json:"module_name"` 28 // Type of a resource module. 29 // jar: User JAR file 30 // pyFile: User Python file 31 // file: User file 32 ModuleType string `json:"module_type"` 33 // List of names of resource packages contained in the group. 34 // This field is returned only when group name is not specified. 35 ResourceNames []string `json:"resource_names"` 36 } 37 38 // Group is a object that represents the detail about a group resource package. 39 type Detail struct { 40 // UNIX time when a resource package is uploaded. The timestamp is expressed in milliseconds. 41 CreateTime int `json:"create_time" required:"true"` 42 // UNIX time when the uploaded resource package is uploaded. The timestamp is expressed in milliseconds. 43 UpdateTime int `json:"update_time"` 44 // Resource type. 45 ResourceType string `json:"resource_type" required:"true"` 46 // Resource name. 47 ResourceName string `json:"resource_name"` 48 // Value UPLOADING indicates that the resource package group is being uploaded. 49 // Value READY indicates that the resource package has been uploaded. 50 // Value FAILED indicates that the resource package fails to be uploaded. 51 Status string `json:"status"` 52 // Name of the resource packages in a queue. 53 UnderlyingName string `json:"underlying_name"` 54 // Whether to upload resource packages in asynchronous mode. 55 // The default value is false, indicating that the asynchronous mode is not used. 56 // You are advised to upload resource packages in asynchronous mode. 57 IsAsync bool `json:"is_async"` 58 } 59 60 // ListResp is a object that represents the List method result. 61 type ListResp struct { 62 // List of names, type and other informations of uploaded user resources. 63 Resources []Resource `json:"resources"` 64 // List of built-in resource groups. For details about the groups, see Table 5. 65 Modules []Module `json:"modules"` 66 // Uploaded package groups of a user. 67 Groups []Group `json:"groups"` 68 // Total number of returned resource packages. 69 Total int `json:"total" required:"true"` 70 } 71 72 // Resource is a object that represents the names, type and other informations of uploaded user resources. 73 type Resource struct { 74 // UNIX timestamp when a resource package is uploaded. 75 CreateTime int `json:"create_time"` 76 // UNIX timestamp when the uploaded resource package is uploaded. 77 UpdateTime int `json:"update_time"` 78 // Resource type. 79 ResourceType string `json:"resource_type"` 80 // Resource name. 81 ResourceName string `json:"resource_name"` 82 // Value UPLOADING indicates that the resource package is being uploaded. 83 // Value READY indicates that the resource package has been uploaded. 84 // Value FAILED indicates that the resource package fails to be uploaded. 85 Status string `json:"status"` 86 // Name of the resource package in the queue. 87 UnderlyingName string `json:"underlying_name"` 88 // Owner of a resource package. 89 Owner string `json:"owner"` 90 } 91 92 // Module is a object that represents the built-in resource group. 93 type Module struct { 94 // Module name. 95 ModuleName string `json:"module_name"` 96 // Module type. 97 ModuleType string `json:"module_type"` 98 // Value UPLOADING indicates that the package group is being uploaded. 99 // Value READY indicates that the package group has been uploaded. 100 // Value FAILED indicates that the package group fails to be uploaded. 101 Status string `json:"status"` 102 // List of names of resource packages contained in the group. 103 Resources []string `json:"resources"` 104 // Module description. 105 Description string `json:"description"` 106 // UNIX timestamp when a package group is uploaded. 107 CreateTime int `json:"create_time"` 108 // UNIX timestamp when a package group is updated. 109 UpdateTime int `json:"update_time"` 110 } 111 112 // UpdateResp is a object that represents the update method result. 113 type UpdateResp struct { 114 // Whether the request is successfully executed. Value true indicates that the request is successfully executed. 115 IsSuccess bool `json:"is_success"` 116 // System prompt. If execution succeeds, the parameter setting may be left blank. 117 Message string `json:"message"` 118 }