/
type-volume-state-attributes.go
352 lines (297 loc) · 11.8 KB
/
type-volume-state-attributes.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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
package azgo
import (
"encoding/xml"
"reflect"
log "github.com/sirupsen/logrus"
)
// VolumeStateAttributesType is a structure to represent a volume-state-attributes ZAPI object
type VolumeStateAttributesType struct {
XMLName xml.Name `xml:"volume-state-attributes"`
BecomeNodeRootAfterRebootPtr *bool `xml:"become-node-root-after-reboot"`
ForceNvfailOnDrPtr *bool `xml:"force-nvfail-on-dr"`
IgnoreInconsistentPtr *bool `xml:"ignore-inconsistent"`
InNvfailedStatePtr *bool `xml:"in-nvfailed-state"`
IsClusterVolumePtr *bool `xml:"is-cluster-volume"`
IsConstituentPtr *bool `xml:"is-constituent"`
IsFlexgroupPtr *bool `xml:"is-flexgroup"`
IsFlexgroupQtreeEnabledPtr *bool `xml:"is-flexgroup-qtree-enabled"`
IsInconsistentPtr *bool `xml:"is-inconsistent"`
IsInvalidPtr *bool `xml:"is-invalid"`
IsJunctionActivePtr *bool `xml:"is-junction-active"`
IsMoveDestinationInCutoverPtr *bool `xml:"is-move-destination-in-cutover"`
IsMovingPtr *bool `xml:"is-moving"`
IsNodeRootPtr *bool `xml:"is-node-root"`
IsNvfailEnabledPtr *bool `xml:"is-nvfail-enabled"`
IsProtocolAccessFencedPtr *bool `xml:"is-protocol-access-fenced"`
IsQuiescedInMemoryPtr *bool `xml:"is-quiesced-in-memory"`
IsQuiescedOnDiskPtr *bool `xml:"is-quiesced-on-disk"`
IsUnrecoverablePtr *bool `xml:"is-unrecoverable"`
IsVolumeInCutoverPtr *bool `xml:"is-volume-in-cutover"`
IsVserverRootPtr *bool `xml:"is-vserver-root"`
StatePtr *string `xml:"state"`
StatusPtr *VolumeStateAttributesTypeStatus `xml:"status"`
// work in progress
}
// NewVolumeStateAttributesType is a factory method for creating new instances of VolumeStateAttributesType objects
func NewVolumeStateAttributesType() *VolumeStateAttributesType {
return &VolumeStateAttributesType{}
}
// ToXML converts this object into an xml string representation
func (o *VolumeStateAttributesType) 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 VolumeStateAttributesType) String() string {
return ToString(reflect.ValueOf(o))
}
// BecomeNodeRootAfterReboot is a 'getter' method
func (o *VolumeStateAttributesType) BecomeNodeRootAfterReboot() bool {
r := *o.BecomeNodeRootAfterRebootPtr
return r
}
// SetBecomeNodeRootAfterReboot is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetBecomeNodeRootAfterReboot(newValue bool) *VolumeStateAttributesType {
o.BecomeNodeRootAfterRebootPtr = &newValue
return o
}
// ForceNvfailOnDr is a 'getter' method
func (o *VolumeStateAttributesType) ForceNvfailOnDr() bool {
r := *o.ForceNvfailOnDrPtr
return r
}
// SetForceNvfailOnDr is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetForceNvfailOnDr(newValue bool) *VolumeStateAttributesType {
o.ForceNvfailOnDrPtr = &newValue
return o
}
// IgnoreInconsistent is a 'getter' method
func (o *VolumeStateAttributesType) IgnoreInconsistent() bool {
r := *o.IgnoreInconsistentPtr
return r
}
// SetIgnoreInconsistent is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIgnoreInconsistent(newValue bool) *VolumeStateAttributesType {
o.IgnoreInconsistentPtr = &newValue
return o
}
// InNvfailedState is a 'getter' method
func (o *VolumeStateAttributesType) InNvfailedState() bool {
r := *o.InNvfailedStatePtr
return r
}
// SetInNvfailedState is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetInNvfailedState(newValue bool) *VolumeStateAttributesType {
o.InNvfailedStatePtr = &newValue
return o
}
// IsClusterVolume is a 'getter' method
func (o *VolumeStateAttributesType) IsClusterVolume() bool {
r := *o.IsClusterVolumePtr
return r
}
// SetIsClusterVolume is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsClusterVolume(newValue bool) *VolumeStateAttributesType {
o.IsClusterVolumePtr = &newValue
return o
}
// IsConstituent is a 'getter' method
func (o *VolumeStateAttributesType) IsConstituent() bool {
r := *o.IsConstituentPtr
return r
}
// SetIsConstituent is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsConstituent(newValue bool) *VolumeStateAttributesType {
o.IsConstituentPtr = &newValue
return o
}
// IsFlexgroup is a 'getter' method
func (o *VolumeStateAttributesType) IsFlexgroup() bool {
r := *o.IsFlexgroupPtr
return r
}
// SetIsFlexgroup is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsFlexgroup(newValue bool) *VolumeStateAttributesType {
o.IsFlexgroupPtr = &newValue
return o
}
// IsFlexgroupQtreeEnabled is a 'getter' method
func (o *VolumeStateAttributesType) IsFlexgroupQtreeEnabled() bool {
r := *o.IsFlexgroupQtreeEnabledPtr
return r
}
// SetIsFlexgroupQtreeEnabled is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsFlexgroupQtreeEnabled(newValue bool) *VolumeStateAttributesType {
o.IsFlexgroupQtreeEnabledPtr = &newValue
return o
}
// IsInconsistent is a 'getter' method
func (o *VolumeStateAttributesType) IsInconsistent() bool {
r := *o.IsInconsistentPtr
return r
}
// SetIsInconsistent is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsInconsistent(newValue bool) *VolumeStateAttributesType {
o.IsInconsistentPtr = &newValue
return o
}
// IsInvalid is a 'getter' method
func (o *VolumeStateAttributesType) IsInvalid() bool {
r := *o.IsInvalidPtr
return r
}
// SetIsInvalid is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsInvalid(newValue bool) *VolumeStateAttributesType {
o.IsInvalidPtr = &newValue
return o
}
// IsJunctionActive is a 'getter' method
func (o *VolumeStateAttributesType) IsJunctionActive() bool {
r := *o.IsJunctionActivePtr
return r
}
// SetIsJunctionActive is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsJunctionActive(newValue bool) *VolumeStateAttributesType {
o.IsJunctionActivePtr = &newValue
return o
}
// IsMoveDestinationInCutover is a 'getter' method
func (o *VolumeStateAttributesType) IsMoveDestinationInCutover() bool {
r := *o.IsMoveDestinationInCutoverPtr
return r
}
// SetIsMoveDestinationInCutover is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsMoveDestinationInCutover(newValue bool) *VolumeStateAttributesType {
o.IsMoveDestinationInCutoverPtr = &newValue
return o
}
// IsMoving is a 'getter' method
func (o *VolumeStateAttributesType) IsMoving() bool {
r := *o.IsMovingPtr
return r
}
// SetIsMoving is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsMoving(newValue bool) *VolumeStateAttributesType {
o.IsMovingPtr = &newValue
return o
}
// IsNodeRoot is a 'getter' method
func (o *VolumeStateAttributesType) IsNodeRoot() bool {
r := *o.IsNodeRootPtr
return r
}
// SetIsNodeRoot is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsNodeRoot(newValue bool) *VolumeStateAttributesType {
o.IsNodeRootPtr = &newValue
return o
}
// IsNvfailEnabled is a 'getter' method
func (o *VolumeStateAttributesType) IsNvfailEnabled() bool {
r := *o.IsNvfailEnabledPtr
return r
}
// SetIsNvfailEnabled is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsNvfailEnabled(newValue bool) *VolumeStateAttributesType {
o.IsNvfailEnabledPtr = &newValue
return o
}
// IsProtocolAccessFenced is a 'getter' method
func (o *VolumeStateAttributesType) IsProtocolAccessFenced() bool {
r := *o.IsProtocolAccessFencedPtr
return r
}
// SetIsProtocolAccessFenced is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsProtocolAccessFenced(newValue bool) *VolumeStateAttributesType {
o.IsProtocolAccessFencedPtr = &newValue
return o
}
// IsQuiescedInMemory is a 'getter' method
func (o *VolumeStateAttributesType) IsQuiescedInMemory() bool {
r := *o.IsQuiescedInMemoryPtr
return r
}
// SetIsQuiescedInMemory is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsQuiescedInMemory(newValue bool) *VolumeStateAttributesType {
o.IsQuiescedInMemoryPtr = &newValue
return o
}
// IsQuiescedOnDisk is a 'getter' method
func (o *VolumeStateAttributesType) IsQuiescedOnDisk() bool {
r := *o.IsQuiescedOnDiskPtr
return r
}
// SetIsQuiescedOnDisk is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsQuiescedOnDisk(newValue bool) *VolumeStateAttributesType {
o.IsQuiescedOnDiskPtr = &newValue
return o
}
// IsUnrecoverable is a 'getter' method
func (o *VolumeStateAttributesType) IsUnrecoverable() bool {
r := *o.IsUnrecoverablePtr
return r
}
// SetIsUnrecoverable is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsUnrecoverable(newValue bool) *VolumeStateAttributesType {
o.IsUnrecoverablePtr = &newValue
return o
}
// IsVolumeInCutover is a 'getter' method
func (o *VolumeStateAttributesType) IsVolumeInCutover() bool {
r := *o.IsVolumeInCutoverPtr
return r
}
// SetIsVolumeInCutover is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsVolumeInCutover(newValue bool) *VolumeStateAttributesType {
o.IsVolumeInCutoverPtr = &newValue
return o
}
// IsVserverRoot is a 'getter' method
func (o *VolumeStateAttributesType) IsVserverRoot() bool {
r := *o.IsVserverRootPtr
return r
}
// SetIsVserverRoot is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetIsVserverRoot(newValue bool) *VolumeStateAttributesType {
o.IsVserverRootPtr = &newValue
return o
}
// State is a 'getter' method
func (o *VolumeStateAttributesType) State() string {
r := *o.StatePtr
return r
}
// SetState is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetState(newValue string) *VolumeStateAttributesType {
o.StatePtr = &newValue
return o
}
// VolumeStateAttributesTypeStatus is a wrapper
type VolumeStateAttributesTypeStatus struct {
XMLName xml.Name `xml:"status"`
StringPtr []string `xml:"string"`
}
// String is a 'getter' method
func (o *VolumeStateAttributesTypeStatus) String() []string {
r := o.StringPtr
return r
}
// SetString is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesTypeStatus) SetString(newValue []string) *VolumeStateAttributesTypeStatus {
newSlice := make([]string, len(newValue))
copy(newSlice, newValue)
o.StringPtr = newSlice
return o
}
// Status is a 'getter' method
func (o *VolumeStateAttributesType) Status() VolumeStateAttributesTypeStatus {
r := *o.StatusPtr
return r
}
// SetStatus is a fluent style 'setter' method that can be chained
func (o *VolumeStateAttributesType) SetStatus(newValue VolumeStateAttributesTypeStatus) *VolumeStateAttributesType {
o.StatusPtr = &newValue
return o
}