-
Notifications
You must be signed in to change notification settings - Fork 0
/
api-system-get-version.go
241 lines (201 loc) · 9.2 KB
/
api-system-get-version.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
package azgo
import (
"encoding/xml"
"reflect"
log "github.com/sirupsen/logrus"
)
// SystemGetVersionRequest is a structure to represent a system-get-version Request ZAPI object
type SystemGetVersionRequest struct {
XMLName xml.Name `xml:"system-get-version"`
}
// SystemGetVersionResponse is a structure to represent a system-get-version Response ZAPI object
type SystemGetVersionResponse struct {
XMLName xml.Name `xml:"netapp"`
ResponseVersion string `xml:"version,attr"`
ResponseXmlns string `xml:"xmlns,attr"`
Result SystemGetVersionResponseResult `xml:"results"`
}
// NewSystemGetVersionResponse is a factory method for creating new instances of SystemGetVersionResponse objects
func NewSystemGetVersionResponse() *SystemGetVersionResponse {
return &SystemGetVersionResponse{}
}
// String returns a string representation of this object's fields and implements the Stringer interface
func (o SystemGetVersionResponse) String() string {
return ToString(reflect.ValueOf(o))
}
// ToXML converts this object into an xml string representation
func (o *SystemGetVersionResponse) ToXML() (string, error) {
output, err := xml.MarshalIndent(o, " ", " ")
if err != nil {
log.Errorf("error: %v", err)
}
return string(output), err
}
// SystemGetVersionResponseResult is a structure to represent a system-get-version Response Result ZAPI object
type SystemGetVersionResponseResult struct {
XMLName xml.Name `xml:"results"`
ResultStatusAttr string `xml:"status,attr"`
ResultReasonAttr string `xml:"reason,attr"`
ResultErrnoAttr string `xml:"errno,attr"`
BuildTimestampPtr *int `xml:"build-timestamp"`
IsClusteredPtr *bool `xml:"is-clustered"`
NodeVersionDetailsPtr *SystemGetVersionResponseResultNodeVersionDetails `xml:"node-version-details"`
VersionPtr *string `xml:"version"`
VersionTuplePtr *SystemGetVersionResponseResultVersionTuple `xml:"version-tuple"`
}
// NewSystemGetVersionRequest is a factory method for creating new instances of SystemGetVersionRequest objects
func NewSystemGetVersionRequest() *SystemGetVersionRequest {
return &SystemGetVersionRequest{}
}
// NewSystemGetVersionResponseResult is a factory method for creating new instances of SystemGetVersionResponseResult objects
func NewSystemGetVersionResponseResult() *SystemGetVersionResponseResult {
return &SystemGetVersionResponseResult{}
}
// ToXML converts this object into an xml string representation
func (o *SystemGetVersionRequest) ToXML() (string, error) {
output, err := xml.MarshalIndent(o, " ", " ")
if err != nil {
log.Errorf("error: %v", err)
}
return string(output), err
}
// ToXML converts this object into an xml string representation
func (o *SystemGetVersionResponseResult) ToXML() (string, error) {
output, err := xml.MarshalIndent(o, " ", " ")
if err != nil {
log.Errorf("error: %v", err)
}
return string(output), err
}
// String returns a string representation of this object's fields and implements the Stringer interface
func (o SystemGetVersionRequest) String() string {
return ToString(reflect.ValueOf(o))
}
// String returns a string representation of this object's fields and implements the Stringer interface
func (o SystemGetVersionResponseResult) String() string {
return ToString(reflect.ValueOf(o))
}
// ExecuteUsing converts this object to a ZAPI XML representation and uses the supplied ZapiRunner to send to a filer
func (o *SystemGetVersionRequest) ExecuteUsing(zr *ZapiRunner) (*SystemGetVersionResponse, error) {
return o.executeWithoutIteration(zr)
}
// executeWithoutIteration converts this object to a ZAPI XML representation and uses the supplied ZapiRunner to send to a filer
func (o *SystemGetVersionRequest) executeWithoutIteration(zr *ZapiRunner) (*SystemGetVersionResponse, error) {
result, err := zr.ExecuteUsing(o, "SystemGetVersionRequest", NewSystemGetVersionResponse())
if result == nil {
return nil, err
}
return result.(*SystemGetVersionResponse), err
}
// BuildTimestamp is a 'getter' method
func (o *SystemGetVersionResponseResult) BuildTimestamp() int {
r := *o.BuildTimestampPtr
return r
}
// SetBuildTimestamp is a fluent style 'setter' method that can be chained
func (o *SystemGetVersionResponseResult) SetBuildTimestamp(newValue int) *SystemGetVersionResponseResult {
o.BuildTimestampPtr = &newValue
return o
}
// IsClustered is a 'getter' method
func (o *SystemGetVersionResponseResult) IsClustered() bool {
r := *o.IsClusteredPtr
return r
}
// SetIsClustered is a fluent style 'setter' method that can be chained
func (o *SystemGetVersionResponseResult) SetIsClustered(newValue bool) *SystemGetVersionResponseResult {
o.IsClusteredPtr = &newValue
return o
}
// SystemGetVersionResponseResultNodeVersionDetails is a wrapper
type SystemGetVersionResponseResultNodeVersionDetails struct {
XMLName xml.Name `xml:"node-version-details"`
NodeVersionDetailInfoPtr []NodeVersionDetailInfoType `xml:"node-version-detail-info"`
}
// String returns a string representation of this object's fields and implements the Stringer interface
func (o SystemGetVersionResponseResultNodeVersionDetails) String() string {
return ToString(reflect.ValueOf(o))
}
// NodeVersionDetailInfo is a 'getter' method
func (o *SystemGetVersionResponseResultNodeVersionDetails) NodeVersionDetailInfo() []NodeVersionDetailInfoType {
r := o.NodeVersionDetailInfoPtr
return r
}
// SetNodeVersionDetailInfo is a fluent style 'setter' method that can be chained
func (o *SystemGetVersionResponseResultNodeVersionDetails) SetNodeVersionDetailInfo(newValue []NodeVersionDetailInfoType) *SystemGetVersionResponseResultNodeVersionDetails {
newSlice := make([]NodeVersionDetailInfoType, len(newValue))
copy(newSlice, newValue)
o.NodeVersionDetailInfoPtr = newSlice
return o
}
// values is a 'getter' method
func (o *SystemGetVersionResponseResultNodeVersionDetails) values() []NodeVersionDetailInfoType {
r := o.NodeVersionDetailInfoPtr
return r
}
// setValues is a fluent style 'setter' method that can be chained
func (o *SystemGetVersionResponseResultNodeVersionDetails) setValues(newValue []NodeVersionDetailInfoType) *SystemGetVersionResponseResultNodeVersionDetails {
newSlice := make([]NodeVersionDetailInfoType, len(newValue))
copy(newSlice, newValue)
o.NodeVersionDetailInfoPtr = newSlice
return o
}
// NodeVersionDetails is a 'getter' method
func (o *SystemGetVersionResponseResult) NodeVersionDetails() SystemGetVersionResponseResultNodeVersionDetails {
r := *o.NodeVersionDetailsPtr
return r
}
// SetNodeVersionDetails is a fluent style 'setter' method that can be chained
func (o *SystemGetVersionResponseResult) SetNodeVersionDetails(newValue SystemGetVersionResponseResultNodeVersionDetails) *SystemGetVersionResponseResult {
o.NodeVersionDetailsPtr = &newValue
return o
}
// Version is a 'getter' method
func (o *SystemGetVersionResponseResult) Version() string {
r := *o.VersionPtr
return r
}
// SetVersion is a fluent style 'setter' method that can be chained
func (o *SystemGetVersionResponseResult) SetVersion(newValue string) *SystemGetVersionResponseResult {
o.VersionPtr = &newValue
return o
}
// SystemGetVersionResponseResultVersionTuple is a wrapper
type SystemGetVersionResponseResultVersionTuple struct {
XMLName xml.Name `xml:"version-tuple"`
SystemVersionTuplePtr *SystemVersionTupleType `xml:"system-version-tuple"`
}
// String returns a string representation of this object's fields and implements the Stringer interface
func (o SystemGetVersionResponseResultVersionTuple) String() string {
return ToString(reflect.ValueOf(o))
}
// SystemVersionTuple is a 'getter' method
func (o *SystemGetVersionResponseResultVersionTuple) SystemVersionTuple() SystemVersionTupleType {
r := *o.SystemVersionTuplePtr
return r
}
// SetSystemVersionTuple is a fluent style 'setter' method that can be chained
func (o *SystemGetVersionResponseResultVersionTuple) SetSystemVersionTuple(newValue SystemVersionTupleType) *SystemGetVersionResponseResultVersionTuple {
o.SystemVersionTuplePtr = &newValue
return o
}
// values is a 'getter' method
func (o *SystemGetVersionResponseResultVersionTuple) values() SystemVersionTupleType {
r := *o.SystemVersionTuplePtr
return r
}
// setValues is a fluent style 'setter' method that can be chained
func (o *SystemGetVersionResponseResultVersionTuple) setValues(newValue SystemVersionTupleType) *SystemGetVersionResponseResultVersionTuple {
o.SystemVersionTuplePtr = &newValue
return o
}
// VersionTuple is a 'getter' method
func (o *SystemGetVersionResponseResult) VersionTuple() SystemGetVersionResponseResultVersionTuple {
r := *o.VersionTuplePtr
return r
}
// SetVersionTuple is a fluent style 'setter' method that can be chained
func (o *SystemGetVersionResponseResult) SetVersionTuple(newValue SystemGetVersionResponseResultVersionTuple) *SystemGetVersionResponseResult {
o.VersionTuplePtr = &newValue
return o
}