-
Notifications
You must be signed in to change notification settings - Fork 0
/
type-aggr-raid-attributes.go
404 lines (341 loc) · 12.4 KB
/
type-aggr-raid-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
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
package azgo
import (
"encoding/xml"
"reflect"
log "github.com/sirupsen/logrus"
)
// AggrRaidAttributesType is a structure to represent a aggr-raid-attributes ZAPI object
type AggrRaidAttributesType struct {
XMLName xml.Name `xml:"aggr-raid-attributes"`
AggregateTypePtr *string `xml:"aggregate-type"`
CacheRaidGroupSizePtr *int `xml:"cache-raid-group-size"`
ChecksumStatusPtr *string `xml:"checksum-status"`
ChecksumStylePtr *string `xml:"checksum-style"`
DiskCountPtr *int `xml:"disk-count"`
EncryptionKeyIdPtr *string `xml:"encryption-key-id"`
HaPolicyPtr *string `xml:"ha-policy"`
HasLocalRootPtr *bool `xml:"has-local-root"`
HasPartnerRootPtr *bool `xml:"has-partner-root"`
IsChecksumEnabledPtr *bool `xml:"is-checksum-enabled"`
IsCompositePtr *bool `xml:"is-composite"`
IsEncryptedPtr *bool `xml:"is-encrypted"`
IsHybridPtr *bool `xml:"is-hybrid"`
IsHybridEnabledPtr *bool `xml:"is-hybrid-enabled"`
IsInconsistentPtr *bool `xml:"is-inconsistent"`
IsMirroredPtr *bool `xml:"is-mirrored"`
IsRootAggregatePtr *bool `xml:"is-root-aggregate"`
MirrorStatusPtr *string `xml:"mirror-status"`
MountStatePtr *string `xml:"mount-state"`
PlexCountPtr *int `xml:"plex-count"`
PlexesPtr *AggrRaidAttributesTypePlexes `xml:"plexes"`
// work in progress
RaidLostWriteStatePtr *string `xml:"raid-lost-write-state"`
RaidSizePtr *int `xml:"raid-size"`
RaidStatusPtr *string `xml:"raid-status"`
RaidTypePtr *string `xml:"raid-type"`
StatePtr *string `xml:"state"`
UsesSharedDisksPtr *bool `xml:"uses-shared-disks"`
}
// NewAggrRaidAttributesType is a factory method for creating new instances of AggrRaidAttributesType objects
func NewAggrRaidAttributesType() *AggrRaidAttributesType {
return &AggrRaidAttributesType{}
}
// ToXML converts this object into an xml string representation
func (o *AggrRaidAttributesType) 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 AggrRaidAttributesType) String() string {
return ToString(reflect.ValueOf(o))
}
// AggregateType is a 'getter' method
func (o *AggrRaidAttributesType) AggregateType() string {
r := *o.AggregateTypePtr
return r
}
// SetAggregateType is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetAggregateType(newValue string) *AggrRaidAttributesType {
o.AggregateTypePtr = &newValue
return o
}
// CacheRaidGroupSize is a 'getter' method
func (o *AggrRaidAttributesType) CacheRaidGroupSize() int {
r := *o.CacheRaidGroupSizePtr
return r
}
// SetCacheRaidGroupSize is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetCacheRaidGroupSize(newValue int) *AggrRaidAttributesType {
o.CacheRaidGroupSizePtr = &newValue
return o
}
// ChecksumStatus is a 'getter' method
func (o *AggrRaidAttributesType) ChecksumStatus() string {
r := *o.ChecksumStatusPtr
return r
}
// SetChecksumStatus is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetChecksumStatus(newValue string) *AggrRaidAttributesType {
o.ChecksumStatusPtr = &newValue
return o
}
// ChecksumStyle is a 'getter' method
func (o *AggrRaidAttributesType) ChecksumStyle() string {
r := *o.ChecksumStylePtr
return r
}
// SetChecksumStyle is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetChecksumStyle(newValue string) *AggrRaidAttributesType {
o.ChecksumStylePtr = &newValue
return o
}
// DiskCount is a 'getter' method
func (o *AggrRaidAttributesType) DiskCount() int {
r := *o.DiskCountPtr
return r
}
// SetDiskCount is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetDiskCount(newValue int) *AggrRaidAttributesType {
o.DiskCountPtr = &newValue
return o
}
// EncryptionKeyId is a 'getter' method
func (o *AggrRaidAttributesType) EncryptionKeyId() string {
r := *o.EncryptionKeyIdPtr
return r
}
// SetEncryptionKeyId is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetEncryptionKeyId(newValue string) *AggrRaidAttributesType {
o.EncryptionKeyIdPtr = &newValue
return o
}
// HaPolicy is a 'getter' method
func (o *AggrRaidAttributesType) HaPolicy() string {
r := *o.HaPolicyPtr
return r
}
// SetHaPolicy is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetHaPolicy(newValue string) *AggrRaidAttributesType {
o.HaPolicyPtr = &newValue
return o
}
// HasLocalRoot is a 'getter' method
func (o *AggrRaidAttributesType) HasLocalRoot() bool {
r := *o.HasLocalRootPtr
return r
}
// SetHasLocalRoot is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetHasLocalRoot(newValue bool) *AggrRaidAttributesType {
o.HasLocalRootPtr = &newValue
return o
}
// HasPartnerRoot is a 'getter' method
func (o *AggrRaidAttributesType) HasPartnerRoot() bool {
r := *o.HasPartnerRootPtr
return r
}
// SetHasPartnerRoot is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetHasPartnerRoot(newValue bool) *AggrRaidAttributesType {
o.HasPartnerRootPtr = &newValue
return o
}
// IsChecksumEnabled is a 'getter' method
func (o *AggrRaidAttributesType) IsChecksumEnabled() bool {
r := *o.IsChecksumEnabledPtr
return r
}
// SetIsChecksumEnabled is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetIsChecksumEnabled(newValue bool) *AggrRaidAttributesType {
o.IsChecksumEnabledPtr = &newValue
return o
}
// IsComposite is a 'getter' method
func (o *AggrRaidAttributesType) IsComposite() bool {
r := *o.IsCompositePtr
return r
}
// SetIsComposite is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetIsComposite(newValue bool) *AggrRaidAttributesType {
o.IsCompositePtr = &newValue
return o
}
// IsEncrypted is a 'getter' method
func (o *AggrRaidAttributesType) IsEncrypted() bool {
r := *o.IsEncryptedPtr
return r
}
// SetIsEncrypted is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetIsEncrypted(newValue bool) *AggrRaidAttributesType {
o.IsEncryptedPtr = &newValue
return o
}
// IsHybrid is a 'getter' method
func (o *AggrRaidAttributesType) IsHybrid() bool {
r := *o.IsHybridPtr
return r
}
// SetIsHybrid is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetIsHybrid(newValue bool) *AggrRaidAttributesType {
o.IsHybridPtr = &newValue
return o
}
// IsHybridEnabled is a 'getter' method
func (o *AggrRaidAttributesType) IsHybridEnabled() bool {
r := *o.IsHybridEnabledPtr
return r
}
// SetIsHybridEnabled is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetIsHybridEnabled(newValue bool) *AggrRaidAttributesType {
o.IsHybridEnabledPtr = &newValue
return o
}
// IsInconsistent is a 'getter' method
func (o *AggrRaidAttributesType) IsInconsistent() bool {
r := *o.IsInconsistentPtr
return r
}
// SetIsInconsistent is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetIsInconsistent(newValue bool) *AggrRaidAttributesType {
o.IsInconsistentPtr = &newValue
return o
}
// IsMirrored is a 'getter' method
func (o *AggrRaidAttributesType) IsMirrored() bool {
r := *o.IsMirroredPtr
return r
}
// SetIsMirrored is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetIsMirrored(newValue bool) *AggrRaidAttributesType {
o.IsMirroredPtr = &newValue
return o
}
// IsRootAggregate is a 'getter' method
func (o *AggrRaidAttributesType) IsRootAggregate() bool {
r := *o.IsRootAggregatePtr
return r
}
// SetIsRootAggregate is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetIsRootAggregate(newValue bool) *AggrRaidAttributesType {
o.IsRootAggregatePtr = &newValue
return o
}
// MirrorStatus is a 'getter' method
func (o *AggrRaidAttributesType) MirrorStatus() string {
r := *o.MirrorStatusPtr
return r
}
// SetMirrorStatus is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetMirrorStatus(newValue string) *AggrRaidAttributesType {
o.MirrorStatusPtr = &newValue
return o
}
// MountState is a 'getter' method
func (o *AggrRaidAttributesType) MountState() string {
r := *o.MountStatePtr
return r
}
// SetMountState is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetMountState(newValue string) *AggrRaidAttributesType {
o.MountStatePtr = &newValue
return o
}
// PlexCount is a 'getter' method
func (o *AggrRaidAttributesType) PlexCount() int {
r := *o.PlexCountPtr
return r
}
// SetPlexCount is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetPlexCount(newValue int) *AggrRaidAttributesType {
o.PlexCountPtr = &newValue
return o
}
// AggrRaidAttributesTypePlexes is a wrapper
type AggrRaidAttributesTypePlexes struct {
XMLName xml.Name `xml:"plexes"`
PlexAttributesPtr []PlexAttributesType `xml:"plex-attributes"`
}
// PlexAttributes is a 'getter' method
func (o *AggrRaidAttributesTypePlexes) PlexAttributes() []PlexAttributesType {
r := o.PlexAttributesPtr
return r
}
// SetPlexAttributes is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesTypePlexes) SetPlexAttributes(newValue []PlexAttributesType) *AggrRaidAttributesTypePlexes {
newSlice := make([]PlexAttributesType, len(newValue))
copy(newSlice, newValue)
o.PlexAttributesPtr = newSlice
return o
}
// Plexes is a 'getter' method
func (o *AggrRaidAttributesType) Plexes() AggrRaidAttributesTypePlexes {
r := *o.PlexesPtr
return r
}
// SetPlexes is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetPlexes(newValue AggrRaidAttributesTypePlexes) *AggrRaidAttributesType {
o.PlexesPtr = &newValue
return o
}
// RaidLostWriteState is a 'getter' method
func (o *AggrRaidAttributesType) RaidLostWriteState() string {
r := *o.RaidLostWriteStatePtr
return r
}
// SetRaidLostWriteState is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetRaidLostWriteState(newValue string) *AggrRaidAttributesType {
o.RaidLostWriteStatePtr = &newValue
return o
}
// RaidSize is a 'getter' method
func (o *AggrRaidAttributesType) RaidSize() int {
r := *o.RaidSizePtr
return r
}
// SetRaidSize is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetRaidSize(newValue int) *AggrRaidAttributesType {
o.RaidSizePtr = &newValue
return o
}
// RaidStatus is a 'getter' method
func (o *AggrRaidAttributesType) RaidStatus() string {
r := *o.RaidStatusPtr
return r
}
// SetRaidStatus is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetRaidStatus(newValue string) *AggrRaidAttributesType {
o.RaidStatusPtr = &newValue
return o
}
// RaidType is a 'getter' method
func (o *AggrRaidAttributesType) RaidType() string {
r := *o.RaidTypePtr
return r
}
// SetRaidType is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetRaidType(newValue string) *AggrRaidAttributesType {
o.RaidTypePtr = &newValue
return o
}
// State is a 'getter' method
func (o *AggrRaidAttributesType) State() string {
r := *o.StatePtr
return r
}
// SetState is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetState(newValue string) *AggrRaidAttributesType {
o.StatePtr = &newValue
return o
}
// UsesSharedDisks is a 'getter' method
func (o *AggrRaidAttributesType) UsesSharedDisks() bool {
r := *o.UsesSharedDisksPtr
return r
}
// SetUsesSharedDisks is a fluent style 'setter' method that can be chained
func (o *AggrRaidAttributesType) SetUsesSharedDisks(newValue bool) *AggrRaidAttributesType {
o.UsesSharedDisksPtr = &newValue
return o
}