-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathmodel_create_volume_payload.go
More file actions
851 lines (698 loc) · 30.9 KB
/
model_create_volume_payload.go
File metadata and controls
851 lines (698 loc) · 30.9 KB
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
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
/*
STACKIT IaaS API
This API allows you to create and modify IaaS resources.
API version: 2
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package iaas
import (
"encoding/json"
"time"
)
// checks if the CreateVolumePayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateVolumePayload{}
/*
types and functions for availabilityZone
*/
// isNotNullableString
type CreateVolumePayloadGetAvailabilityZoneAttributeType = *string
func getCreateVolumePayloadGetAvailabilityZoneAttributeTypeOk(arg CreateVolumePayloadGetAvailabilityZoneAttributeType) (ret CreateVolumePayloadGetAvailabilityZoneRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetAvailabilityZoneAttributeType(arg *CreateVolumePayloadGetAvailabilityZoneAttributeType, val CreateVolumePayloadGetAvailabilityZoneRetType) {
*arg = &val
}
type CreateVolumePayloadGetAvailabilityZoneArgType = string
type CreateVolumePayloadGetAvailabilityZoneRetType = string
/*
types and functions for bootable
*/
// isBoolean
type CreateVolumePayloadgetBootableAttributeType = *bool
type CreateVolumePayloadgetBootableArgType = bool
type CreateVolumePayloadgetBootableRetType = bool
func getCreateVolumePayloadgetBootableAttributeTypeOk(arg CreateVolumePayloadgetBootableAttributeType) (ret CreateVolumePayloadgetBootableRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadgetBootableAttributeType(arg *CreateVolumePayloadgetBootableAttributeType, val CreateVolumePayloadgetBootableRetType) {
*arg = &val
}
/*
types and functions for createdAt
*/
// isDateTime
type CreateVolumePayloadGetCreatedAtAttributeType = *time.Time
type CreateVolumePayloadGetCreatedAtArgType = time.Time
type CreateVolumePayloadGetCreatedAtRetType = time.Time
func getCreateVolumePayloadGetCreatedAtAttributeTypeOk(arg CreateVolumePayloadGetCreatedAtAttributeType) (ret CreateVolumePayloadGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetCreatedAtAttributeType(arg *CreateVolumePayloadGetCreatedAtAttributeType, val CreateVolumePayloadGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for description
*/
// isNotNullableString
type CreateVolumePayloadGetDescriptionAttributeType = *string
func getCreateVolumePayloadGetDescriptionAttributeTypeOk(arg CreateVolumePayloadGetDescriptionAttributeType) (ret CreateVolumePayloadGetDescriptionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetDescriptionAttributeType(arg *CreateVolumePayloadGetDescriptionAttributeType, val CreateVolumePayloadGetDescriptionRetType) {
*arg = &val
}
type CreateVolumePayloadGetDescriptionArgType = string
type CreateVolumePayloadGetDescriptionRetType = string
/*
types and functions for encrypted
*/
// isBoolean
type CreateVolumePayloadgetEncryptedAttributeType = *bool
type CreateVolumePayloadgetEncryptedArgType = bool
type CreateVolumePayloadgetEncryptedRetType = bool
func getCreateVolumePayloadgetEncryptedAttributeTypeOk(arg CreateVolumePayloadgetEncryptedAttributeType) (ret CreateVolumePayloadgetEncryptedRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadgetEncryptedAttributeType(arg *CreateVolumePayloadgetEncryptedAttributeType, val CreateVolumePayloadgetEncryptedRetType) {
*arg = &val
}
/*
types and functions for encryptionParameters
*/
// isModel
type CreateVolumePayloadGetEncryptionParametersAttributeType = *VolumeEncryptionParameter
type CreateVolumePayloadGetEncryptionParametersArgType = VolumeEncryptionParameter
type CreateVolumePayloadGetEncryptionParametersRetType = VolumeEncryptionParameter
func getCreateVolumePayloadGetEncryptionParametersAttributeTypeOk(arg CreateVolumePayloadGetEncryptionParametersAttributeType) (ret CreateVolumePayloadGetEncryptionParametersRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetEncryptionParametersAttributeType(arg *CreateVolumePayloadGetEncryptionParametersAttributeType, val CreateVolumePayloadGetEncryptionParametersRetType) {
*arg = &val
}
/*
types and functions for id
*/
// isNotNullableString
type CreateVolumePayloadGetIdAttributeType = *string
func getCreateVolumePayloadGetIdAttributeTypeOk(arg CreateVolumePayloadGetIdAttributeType) (ret CreateVolumePayloadGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetIdAttributeType(arg *CreateVolumePayloadGetIdAttributeType, val CreateVolumePayloadGetIdRetType) {
*arg = &val
}
type CreateVolumePayloadGetIdArgType = string
type CreateVolumePayloadGetIdRetType = string
/*
types and functions for imageConfig
*/
// isModel
type CreateVolumePayloadGetImageConfigAttributeType = *ImageConfig
type CreateVolumePayloadGetImageConfigArgType = ImageConfig
type CreateVolumePayloadGetImageConfigRetType = ImageConfig
func getCreateVolumePayloadGetImageConfigAttributeTypeOk(arg CreateVolumePayloadGetImageConfigAttributeType) (ret CreateVolumePayloadGetImageConfigRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetImageConfigAttributeType(arg *CreateVolumePayloadGetImageConfigAttributeType, val CreateVolumePayloadGetImageConfigRetType) {
*arg = &val
}
/*
types and functions for labels
*/
// isFreeform
type CreateVolumePayloadGetLabelsAttributeType = *map[string]interface{}
type CreateVolumePayloadGetLabelsArgType = map[string]interface{}
type CreateVolumePayloadGetLabelsRetType = map[string]interface{}
func getCreateVolumePayloadGetLabelsAttributeTypeOk(arg CreateVolumePayloadGetLabelsAttributeType) (ret CreateVolumePayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetLabelsAttributeType(arg *CreateVolumePayloadGetLabelsAttributeType, val CreateVolumePayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type CreateVolumePayloadGetNameAttributeType = *string
func getCreateVolumePayloadGetNameAttributeTypeOk(arg CreateVolumePayloadGetNameAttributeType) (ret CreateVolumePayloadGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetNameAttributeType(arg *CreateVolumePayloadGetNameAttributeType, val CreateVolumePayloadGetNameRetType) {
*arg = &val
}
type CreateVolumePayloadGetNameArgType = string
type CreateVolumePayloadGetNameRetType = string
/*
types and functions for performanceClass
*/
// isNotNullableString
type CreateVolumePayloadGetPerformanceClassAttributeType = *string
func getCreateVolumePayloadGetPerformanceClassAttributeTypeOk(arg CreateVolumePayloadGetPerformanceClassAttributeType) (ret CreateVolumePayloadGetPerformanceClassRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetPerformanceClassAttributeType(arg *CreateVolumePayloadGetPerformanceClassAttributeType, val CreateVolumePayloadGetPerformanceClassRetType) {
*arg = &val
}
type CreateVolumePayloadGetPerformanceClassArgType = string
type CreateVolumePayloadGetPerformanceClassRetType = string
/*
types and functions for serverId
*/
// isNotNullableString
type CreateVolumePayloadGetServerIdAttributeType = *string
func getCreateVolumePayloadGetServerIdAttributeTypeOk(arg CreateVolumePayloadGetServerIdAttributeType) (ret CreateVolumePayloadGetServerIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetServerIdAttributeType(arg *CreateVolumePayloadGetServerIdAttributeType, val CreateVolumePayloadGetServerIdRetType) {
*arg = &val
}
type CreateVolumePayloadGetServerIdArgType = string
type CreateVolumePayloadGetServerIdRetType = string
/*
types and functions for size
*/
// isLong
type CreateVolumePayloadGetSizeAttributeType = *int64
type CreateVolumePayloadGetSizeArgType = int64
type CreateVolumePayloadGetSizeRetType = int64
func getCreateVolumePayloadGetSizeAttributeTypeOk(arg CreateVolumePayloadGetSizeAttributeType) (ret CreateVolumePayloadGetSizeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetSizeAttributeType(arg *CreateVolumePayloadGetSizeAttributeType, val CreateVolumePayloadGetSizeRetType) {
*arg = &val
}
/*
types and functions for source
*/
// isModel
type CreateVolumePayloadGetSourceAttributeType = *VolumeSource
type CreateVolumePayloadGetSourceArgType = VolumeSource
type CreateVolumePayloadGetSourceRetType = VolumeSource
func getCreateVolumePayloadGetSourceAttributeTypeOk(arg CreateVolumePayloadGetSourceAttributeType) (ret CreateVolumePayloadGetSourceRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetSourceAttributeType(arg *CreateVolumePayloadGetSourceAttributeType, val CreateVolumePayloadGetSourceRetType) {
*arg = &val
}
/*
types and functions for status
*/
// isNotNullableString
type CreateVolumePayloadGetStatusAttributeType = *string
func getCreateVolumePayloadGetStatusAttributeTypeOk(arg CreateVolumePayloadGetStatusAttributeType) (ret CreateVolumePayloadGetStatusRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetStatusAttributeType(arg *CreateVolumePayloadGetStatusAttributeType, val CreateVolumePayloadGetStatusRetType) {
*arg = &val
}
type CreateVolumePayloadGetStatusArgType = string
type CreateVolumePayloadGetStatusRetType = string
/*
types and functions for updatedAt
*/
// isDateTime
type CreateVolumePayloadGetUpdatedAtAttributeType = *time.Time
type CreateVolumePayloadGetUpdatedAtArgType = time.Time
type CreateVolumePayloadGetUpdatedAtRetType = time.Time
func getCreateVolumePayloadGetUpdatedAtAttributeTypeOk(arg CreateVolumePayloadGetUpdatedAtAttributeType) (ret CreateVolumePayloadGetUpdatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetUpdatedAtAttributeType(arg *CreateVolumePayloadGetUpdatedAtAttributeType, val CreateVolumePayloadGetUpdatedAtRetType) {
*arg = &val
}
// CreateVolumePayload Object that represents a volume and its parameters. Volumes sized up to 16000GB are supported.
type CreateVolumePayload struct {
// Object that represents an availability zone.
// REQUIRED
AvailabilityZone CreateVolumePayloadGetAvailabilityZoneAttributeType `json:"availabilityZone" required:"true"`
// Indicates if a volume is bootable.
Bootable CreateVolumePayloadgetBootableAttributeType `json:"bootable,omitempty"`
// Date-time when resource was created.
CreatedAt CreateVolumePayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// Description Object. Allows string up to 255 Characters.
Description CreateVolumePayloadGetDescriptionAttributeType `json:"description,omitempty"`
// Indicates if a volume is encrypted.
Encrypted CreateVolumePayloadgetEncryptedAttributeType `json:"encrypted,omitempty"`
EncryptionParameters CreateVolumePayloadGetEncryptionParametersAttributeType `json:"encryptionParameters,omitempty"`
// Universally Unique Identifier (UUID).
Id CreateVolumePayloadGetIdAttributeType `json:"id,omitempty"`
ImageConfig CreateVolumePayloadGetImageConfigAttributeType `json:"imageConfig,omitempty"`
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys.
Labels CreateVolumePayloadGetLabelsAttributeType `json:"labels,omitempty"`
// The name for a General Object. Matches Names and also UUIDs.
Name CreateVolumePayloadGetNameAttributeType `json:"name,omitempty"`
// The name for a General Object. Matches Names and also UUIDs.
PerformanceClass CreateVolumePayloadGetPerformanceClassAttributeType `json:"performanceClass,omitempty"`
// Universally Unique Identifier (UUID).
ServerId CreateVolumePayloadGetServerIdAttributeType `json:"serverId,omitempty"`
// Size in Gigabyte.
Size CreateVolumePayloadGetSizeAttributeType `json:"size,omitempty"`
Source CreateVolumePayloadGetSourceAttributeType `json:"source,omitempty"`
// The status of a volume object. Possible values: `ATTACHED`, `ATTACHING`, `AVAILABLE`, `AWAITING-TRANSFER`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `DETACHING`, `DOWNLOADING`, `ERROR`, `ERROR_BACKING-UP`, `ERROR_DELETING`, `ERROR_RESIZING`, `ERROR_RESTORING-BACKUP`, `MAINTENANCE`, `RESERVED`, `RESIZING`, `RESTORING-BACKUP`, `RETYPING`, `UPLOADING`.
Status CreateVolumePayloadGetStatusAttributeType `json:"status,omitempty"`
// Date-time when resource was last updated.
UpdatedAt CreateVolumePayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
}
type _CreateVolumePayload CreateVolumePayload
// NewCreateVolumePayload instantiates a new CreateVolumePayload object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCreateVolumePayload(availabilityZone CreateVolumePayloadGetAvailabilityZoneArgType) *CreateVolumePayload {
this := CreateVolumePayload{}
setCreateVolumePayloadGetAvailabilityZoneAttributeType(&this.AvailabilityZone, availabilityZone)
return &this
}
// NewCreateVolumePayloadWithDefaults instantiates a new CreateVolumePayload object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCreateVolumePayloadWithDefaults() *CreateVolumePayload {
this := CreateVolumePayload{}
return &this
}
// GetAvailabilityZone returns the AvailabilityZone field value
func (o *CreateVolumePayload) GetAvailabilityZone() (ret CreateVolumePayloadGetAvailabilityZoneRetType) {
ret, _ = o.GetAvailabilityZoneOk()
return ret
}
// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetAvailabilityZoneOk() (ret CreateVolumePayloadGetAvailabilityZoneRetType, ok bool) {
return getCreateVolumePayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone)
}
// SetAvailabilityZone sets field value
func (o *CreateVolumePayload) SetAvailabilityZone(v CreateVolumePayloadGetAvailabilityZoneRetType) {
setCreateVolumePayloadGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v)
}
// GetBootable returns the Bootable field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetBootable() (res CreateVolumePayloadgetBootableRetType) {
res, _ = o.GetBootableOk()
return
}
// GetBootableOk returns a tuple with the Bootable field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetBootableOk() (ret CreateVolumePayloadgetBootableRetType, ok bool) {
return getCreateVolumePayloadgetBootableAttributeTypeOk(o.Bootable)
}
// HasBootable returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasBootable() bool {
_, ok := o.GetBootableOk()
return ok
}
// SetBootable gets a reference to the given bool and assigns it to the Bootable field.
func (o *CreateVolumePayload) SetBootable(v CreateVolumePayloadgetBootableRetType) {
setCreateVolumePayloadgetBootableAttributeType(&o.Bootable, v)
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetCreatedAt() (res CreateVolumePayloadGetCreatedAtRetType) {
res, _ = o.GetCreatedAtOk()
return
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetCreatedAtOk() (ret CreateVolumePayloadGetCreatedAtRetType, ok bool) {
return getCreateVolumePayloadGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasCreatedAt() bool {
_, ok := o.GetCreatedAtOk()
return ok
}
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
func (o *CreateVolumePayload) SetCreatedAt(v CreateVolumePayloadGetCreatedAtRetType) {
setCreateVolumePayloadGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetDescription() (res CreateVolumePayloadGetDescriptionRetType) {
res, _ = o.GetDescriptionOk()
return
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetDescriptionOk() (ret CreateVolumePayloadGetDescriptionRetType, ok bool) {
return getCreateVolumePayloadGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *CreateVolumePayload) SetDescription(v CreateVolumePayloadGetDescriptionRetType) {
setCreateVolumePayloadGetDescriptionAttributeType(&o.Description, v)
}
// GetEncrypted returns the Encrypted field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetEncrypted() (res CreateVolumePayloadgetEncryptedRetType) {
res, _ = o.GetEncryptedOk()
return
}
// GetEncryptedOk returns a tuple with the Encrypted field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetEncryptedOk() (ret CreateVolumePayloadgetEncryptedRetType, ok bool) {
return getCreateVolumePayloadgetEncryptedAttributeTypeOk(o.Encrypted)
}
// HasEncrypted returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasEncrypted() bool {
_, ok := o.GetEncryptedOk()
return ok
}
// SetEncrypted gets a reference to the given bool and assigns it to the Encrypted field.
func (o *CreateVolumePayload) SetEncrypted(v CreateVolumePayloadgetEncryptedRetType) {
setCreateVolumePayloadgetEncryptedAttributeType(&o.Encrypted, v)
}
// GetEncryptionParameters returns the EncryptionParameters field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetEncryptionParameters() (res CreateVolumePayloadGetEncryptionParametersRetType) {
res, _ = o.GetEncryptionParametersOk()
return
}
// GetEncryptionParametersOk returns a tuple with the EncryptionParameters field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetEncryptionParametersOk() (ret CreateVolumePayloadGetEncryptionParametersRetType, ok bool) {
return getCreateVolumePayloadGetEncryptionParametersAttributeTypeOk(o.EncryptionParameters)
}
// HasEncryptionParameters returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasEncryptionParameters() bool {
_, ok := o.GetEncryptionParametersOk()
return ok
}
// SetEncryptionParameters gets a reference to the given VolumeEncryptionParameter and assigns it to the EncryptionParameters field.
func (o *CreateVolumePayload) SetEncryptionParameters(v CreateVolumePayloadGetEncryptionParametersRetType) {
setCreateVolumePayloadGetEncryptionParametersAttributeType(&o.EncryptionParameters, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetId() (res CreateVolumePayloadGetIdRetType) {
res, _ = o.GetIdOk()
return
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetIdOk() (ret CreateVolumePayloadGetIdRetType, ok bool) {
return getCreateVolumePayloadGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *CreateVolumePayload) SetId(v CreateVolumePayloadGetIdRetType) {
setCreateVolumePayloadGetIdAttributeType(&o.Id, v)
}
// GetImageConfig returns the ImageConfig field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetImageConfig() (res CreateVolumePayloadGetImageConfigRetType) {
res, _ = o.GetImageConfigOk()
return
}
// GetImageConfigOk returns a tuple with the ImageConfig field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetImageConfigOk() (ret CreateVolumePayloadGetImageConfigRetType, ok bool) {
return getCreateVolumePayloadGetImageConfigAttributeTypeOk(o.ImageConfig)
}
// HasImageConfig returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasImageConfig() bool {
_, ok := o.GetImageConfigOk()
return ok
}
// SetImageConfig gets a reference to the given ImageConfig and assigns it to the ImageConfig field.
func (o *CreateVolumePayload) SetImageConfig(v CreateVolumePayloadGetImageConfigRetType) {
setCreateVolumePayloadGetImageConfigAttributeType(&o.ImageConfig, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetLabels() (res CreateVolumePayloadGetLabelsRetType) {
res, _ = o.GetLabelsOk()
return
}
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetLabelsOk() (ret CreateVolumePayloadGetLabelsRetType, ok bool) {
return getCreateVolumePayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
func (o *CreateVolumePayload) SetLabels(v CreateVolumePayloadGetLabelsRetType) {
setCreateVolumePayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetName() (res CreateVolumePayloadGetNameRetType) {
res, _ = o.GetNameOk()
return
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetNameOk() (ret CreateVolumePayloadGetNameRetType, ok bool) {
return getCreateVolumePayloadGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *CreateVolumePayload) SetName(v CreateVolumePayloadGetNameRetType) {
setCreateVolumePayloadGetNameAttributeType(&o.Name, v)
}
// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetPerformanceClass() (res CreateVolumePayloadGetPerformanceClassRetType) {
res, _ = o.GetPerformanceClassOk()
return
}
// GetPerformanceClassOk returns a tuple with the PerformanceClass field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetPerformanceClassOk() (ret CreateVolumePayloadGetPerformanceClassRetType, ok bool) {
return getCreateVolumePayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass)
}
// HasPerformanceClass returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasPerformanceClass() bool {
_, ok := o.GetPerformanceClassOk()
return ok
}
// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field.
func (o *CreateVolumePayload) SetPerformanceClass(v CreateVolumePayloadGetPerformanceClassRetType) {
setCreateVolumePayloadGetPerformanceClassAttributeType(&o.PerformanceClass, v)
}
// GetServerId returns the ServerId field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetServerId() (res CreateVolumePayloadGetServerIdRetType) {
res, _ = o.GetServerIdOk()
return
}
// GetServerIdOk returns a tuple with the ServerId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetServerIdOk() (ret CreateVolumePayloadGetServerIdRetType, ok bool) {
return getCreateVolumePayloadGetServerIdAttributeTypeOk(o.ServerId)
}
// HasServerId returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasServerId() bool {
_, ok := o.GetServerIdOk()
return ok
}
// SetServerId gets a reference to the given string and assigns it to the ServerId field.
func (o *CreateVolumePayload) SetServerId(v CreateVolumePayloadGetServerIdRetType) {
setCreateVolumePayloadGetServerIdAttributeType(&o.ServerId, v)
}
// GetSize returns the Size field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetSize() (res CreateVolumePayloadGetSizeRetType) {
res, _ = o.GetSizeOk()
return
}
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetSizeOk() (ret CreateVolumePayloadGetSizeRetType, ok bool) {
return getCreateVolumePayloadGetSizeAttributeTypeOk(o.Size)
}
// HasSize returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasSize() bool {
_, ok := o.GetSizeOk()
return ok
}
// SetSize gets a reference to the given int64 and assigns it to the Size field.
func (o *CreateVolumePayload) SetSize(v CreateVolumePayloadGetSizeRetType) {
setCreateVolumePayloadGetSizeAttributeType(&o.Size, v)
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetSource() (res CreateVolumePayloadGetSourceRetType) {
res, _ = o.GetSourceOk()
return
}
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetSourceOk() (ret CreateVolumePayloadGetSourceRetType, ok bool) {
return getCreateVolumePayloadGetSourceAttributeTypeOk(o.Source)
}
// HasSource returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasSource() bool {
_, ok := o.GetSourceOk()
return ok
}
// SetSource gets a reference to the given VolumeSource and assigns it to the Source field.
func (o *CreateVolumePayload) SetSource(v CreateVolumePayloadGetSourceRetType) {
setCreateVolumePayloadGetSourceAttributeType(&o.Source, v)
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetStatus() (res CreateVolumePayloadGetStatusRetType) {
res, _ = o.GetStatusOk()
return
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetStatusOk() (ret CreateVolumePayloadGetStatusRetType, ok bool) {
return getCreateVolumePayloadGetStatusAttributeTypeOk(o.Status)
}
// HasStatus returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasStatus() bool {
_, ok := o.GetStatusOk()
return ok
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *CreateVolumePayload) SetStatus(v CreateVolumePayloadGetStatusRetType) {
setCreateVolumePayloadGetStatusAttributeType(&o.Status, v)
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetUpdatedAt() (res CreateVolumePayloadGetUpdatedAtRetType) {
res, _ = o.GetUpdatedAtOk()
return
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetUpdatedAtOk() (ret CreateVolumePayloadGetUpdatedAtRetType, ok bool) {
return getCreateVolumePayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasUpdatedAt() bool {
_, ok := o.GetUpdatedAtOk()
return ok
}
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
func (o *CreateVolumePayload) SetUpdatedAt(v CreateVolumePayloadGetUpdatedAtRetType) {
setCreateVolumePayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v)
}
func (o CreateVolumePayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateVolumePayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok {
toSerialize["AvailabilityZone"] = val
}
if val, ok := getCreateVolumePayloadgetBootableAttributeTypeOk(o.Bootable); ok {
toSerialize["Bootable"] = val
}
if val, ok := getCreateVolumePayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getCreateVolumePayloadGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getCreateVolumePayloadgetEncryptedAttributeTypeOk(o.Encrypted); ok {
toSerialize["Encrypted"] = val
}
if val, ok := getCreateVolumePayloadGetEncryptionParametersAttributeTypeOk(o.EncryptionParameters); ok {
toSerialize["EncryptionParameters"] = val
}
if val, ok := getCreateVolumePayloadGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getCreateVolumePayloadGetImageConfigAttributeTypeOk(o.ImageConfig); ok {
toSerialize["ImageConfig"] = val
}
if val, ok := getCreateVolumePayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getCreateVolumePayloadGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getCreateVolumePayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok {
toSerialize["PerformanceClass"] = val
}
if val, ok := getCreateVolumePayloadGetServerIdAttributeTypeOk(o.ServerId); ok {
toSerialize["ServerId"] = val
}
if val, ok := getCreateVolumePayloadGetSizeAttributeTypeOk(o.Size); ok {
toSerialize["Size"] = val
}
if val, ok := getCreateVolumePayloadGetSourceAttributeTypeOk(o.Source); ok {
toSerialize["Source"] = val
}
if val, ok := getCreateVolumePayloadGetStatusAttributeTypeOk(o.Status); ok {
toSerialize["Status"] = val
}
if val, ok := getCreateVolumePayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
toSerialize["UpdatedAt"] = val
}
return toSerialize, nil
}
type NullableCreateVolumePayload struct {
value *CreateVolumePayload
isSet bool
}
func (v NullableCreateVolumePayload) Get() *CreateVolumePayload {
return v.value
}
func (v *NullableCreateVolumePayload) Set(val *CreateVolumePayload) {
v.value = val
v.isSet = true
}
func (v NullableCreateVolumePayload) IsSet() bool {
return v.isSet
}
func (v *NullableCreateVolumePayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateVolumePayload(val *CreateVolumePayload) *NullableCreateVolumePayload {
return &NullableCreateVolumePayload{value: val, isSet: true}
}
func (v NullableCreateVolumePayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateVolumePayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}