-
Notifications
You must be signed in to change notification settings - Fork 0
/
switchm_dnsconfig.go
97 lines (82 loc) · 2.09 KB
/
switchm_dnsconfig.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package bigdog
// API Version: v9_1
import (
"errors"
"io"
)
// SwitchMDNSConfigCreateDnsConfig
//
// Definition: dnsConfig_createDnsConfig
type SwitchMDNSConfigCreateDnsConfig struct {
Dns *SwitchMDNSConfigObject `json:"dns,omitempty"`
// Id
// Switch Group Id
Id *string `json:"id,omitempty"`
}
func NewSwitchMDNSConfigCreateDnsConfig() *SwitchMDNSConfigCreateDnsConfig {
m := new(SwitchMDNSConfigCreateDnsConfig)
return m
}
// SwitchMDNSConfig
//
// Definition: dnsConfig_dnsConfig
type SwitchMDNSConfig struct {
// CreatedTime
// The create time of the DNS Config
CreatedTime *int `json:"createdTime,omitempty"`
Dns *SwitchMDNSConfigObject `json:"dns,omitempty"`
// UpdatedTime
// The modify time of the DNS Config
UpdatedTime *int `json:"updatedTime,omitempty"`
}
type SwitchMDNSConfigAPIResponse struct {
*RawAPIResponse
Data *SwitchMDNSConfig
}
func newSwitchMDNSConfigAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMDNSConfigAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMDNSConfigAPIResponse) Hydrate() (interface{}, error) {
r.mu.Lock()
defer r.mu.Unlock()
if r.err != nil {
if errors.Is(r.err, ErrResponseHydrated) {
return r.Data, nil
}
return nil, r.err
}
data := new(SwitchMDNSConfig)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMDNSConfig() *SwitchMDNSConfig {
m := new(SwitchMDNSConfig)
return m
}
// SwitchMDNSConfigObject
//
// Definition: dnsConfig_dnsConfigObject
type SwitchMDNSConfigObject struct {
// Ip
// DNS Config IP
Ip *string `json:"ip,omitempty"`
}
func NewSwitchMDNSConfigObject() *SwitchMDNSConfigObject {
m := new(SwitchMDNSConfigObject)
return m
}
// SwitchMDNSConfigUpdateDnsConfig
//
// Definition: dnsConfig_updateDnsConfig
type SwitchMDNSConfigUpdateDnsConfig struct {
Dns *SwitchMDNSConfigObject `json:"dns,omitempty"`
}
func NewSwitchMDNSConfigUpdateDnsConfig() *SwitchMDNSConfigUpdateDnsConfig {
m := new(SwitchMDNSConfigUpdateDnsConfig)
return m
}