github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/dms/v1/availablezones/results.go (about) 1 package availablezones 2 3 import ( 4 "github.com/huaweicloud/golangsdk" 5 ) 6 7 // GetResponse response 8 type GetResponse struct { 9 RegionID string `json:"regionId"` 10 AvailableZones []AvailableZone `json:"available_zones"` 11 } 12 13 // AvailableZone for dms 14 type AvailableZone struct { 15 ID string `json:"id"` 16 Code string `json:"code"` 17 Name string `json:"name"` 18 Port string `json:"port"` 19 ResourceAvailability string `json:"resource_availability"` 20 } 21 22 // GetResult contains the body of getting detailed 23 type GetResult struct { 24 golangsdk.Result 25 } 26 27 // Extract from GetResult 28 func (r GetResult) Extract() (*GetResponse, error) { 29 var s GetResponse 30 err := r.Result.ExtractInto(&s) 31 return &s, err 32 }