github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/waf/v1/clouds/results.go (about) 1 package clouds 2 3 // createResp represents the result of the 'Create' function. 4 type createResp struct { 5 // Order ID. 6 OrderId string `json:"orderId"` 7 } 8 9 // Instance is the structure that represents the details of the cloud WAF instance. 10 type Instance struct { 11 // The type of the cloud WAF. 12 // + -2: Freezen 13 // + -1: Not subscribed 14 // + 2: Standard edition 15 // + 3: Professional edition 16 // + 4: Platinum edition 17 // + 7: Introduction edition. 18 // + 22: Post paid edition. 19 Type int `json:"type"` 20 // The list of all cloud WAF resources. 21 Resources []Resource `json:"resources"` 22 // Whether the current user is new user. 23 IsNewUser bool `json:"isNewUser"` 24 // The subscribe information of the dedicated mode. 25 Premium Premium `json:"premium"` 26 } 27 28 // Resource is the structure that represents the details of the WAF resource. 29 type Resource struct { 30 // Resource ID. 31 ID string `json:"resourceId"` 32 // Resource type. 33 // + hws.resource.type.waf 34 // + hws.resource.type.waf.domain 35 // + hws.resource.type.waf.bandwidth 36 // + hws.resource.type.waf.rule 37 Type string `json:"resourceType"` 38 // The number of the resources. 39 Size int `json:"resourceSize"` 40 // The cloud service type corresponding to the cloud service product. 41 CloudServiceType string `json:"cloudServiceType"` 42 // The specification code of the resource. 43 SpecCode string `json:"resourceSpecCode"` 44 // The current status of the resource. 45 Status int `json:"status"` 46 // The expire time of the resource. 47 // + 0: normal 48 // + 1: freezen 49 ExpireTime string `json:"expireTime"` 50 } 51 52 // Premium is the structure that represents the configuration of the dedicated mode. 53 type Premium struct { 54 // Whether the dedicated mode is opened. 55 Purchased bool `json:"purchased"` 56 // The number of the dedicated instances. 57 Total int `json:"total"` 58 // The number of the ELB instances. 59 ELB int `json:"elb"` 60 // The number of the dedicated WAFs. 61 Dedicated int `json:"dedicated"` 62 } 63 64 // updateResp represents the result of the 'Update' function. 65 type updateResp struct { 66 // Order ID. 67 OrderId string `json:"orderId"` 68 }