github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/waf/v1/alarmnotifications/results.go (about) 1 package alarmnotifications 2 3 import golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 4 5 type AlarmNotification struct { 6 ID string `json:"id"` 7 Enabled bool `json:"enabled"` 8 TopicURN string `json:"topic_urn"` 9 SendFrequency int `json:"sendfreq"` 10 Times int `json:"times"` 11 Threat []string `json:"threat"` 12 Locale string `json:"locale"` 13 } 14 15 type commonResult struct { 16 golangsdk.Result 17 } 18 19 type ListResult struct { 20 commonResult 21 } 22 23 type UpdateResult struct { 24 commonResult 25 } 26 27 func (r commonResult) Extract() (*AlarmNotification, error) { 28 s := new(AlarmNotification) 29 err := r.ExtractIntoStructPtr(s, "") 30 if err != nil { 31 return nil, err 32 } 33 return s, nil 34 }