-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathmodel_image.go
More file actions
894 lines (735 loc) · 25.9 KB
/
model_image.go
File metadata and controls
894 lines (735 loc) · 25.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
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
/*
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 Image type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Image{}
/*
types and functions for agent
*/
// isModel
type ImageGetAgentAttributeType = *ImageAgent
type ImageGetAgentArgType = ImageAgent
type ImageGetAgentRetType = ImageAgent
func getImageGetAgentAttributeTypeOk(arg ImageGetAgentAttributeType) (ret ImageGetAgentRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetAgentAttributeType(arg *ImageGetAgentAttributeType, val ImageGetAgentRetType) {
*arg = &val
}
/*
types and functions for checksum
*/
// isModel
type ImageGetChecksumAttributeType = *ImageChecksum
type ImageGetChecksumArgType = ImageChecksum
type ImageGetChecksumRetType = ImageChecksum
func getImageGetChecksumAttributeTypeOk(arg ImageGetChecksumAttributeType) (ret ImageGetChecksumRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetChecksumAttributeType(arg *ImageGetChecksumAttributeType, val ImageGetChecksumRetType) {
*arg = &val
}
/*
types and functions for config
*/
// isModel
type ImageGetConfigAttributeType = *ImageConfig
type ImageGetConfigArgType = ImageConfig
type ImageGetConfigRetType = ImageConfig
func getImageGetConfigAttributeTypeOk(arg ImageGetConfigAttributeType) (ret ImageGetConfigRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetConfigAttributeType(arg *ImageGetConfigAttributeType, val ImageGetConfigRetType) {
*arg = &val
}
/*
types and functions for createdAt
*/
// isDateTime
type ImageGetCreatedAtAttributeType = *time.Time
type ImageGetCreatedAtArgType = time.Time
type ImageGetCreatedAtRetType = time.Time
func getImageGetCreatedAtAttributeTypeOk(arg ImageGetCreatedAtAttributeType) (ret ImageGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetCreatedAtAttributeType(arg *ImageGetCreatedAtAttributeType, val ImageGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for diskFormat
*/
// isNotNullableString
type ImageGetDiskFormatAttributeType = *string
func getImageGetDiskFormatAttributeTypeOk(arg ImageGetDiskFormatAttributeType) (ret ImageGetDiskFormatRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetDiskFormatAttributeType(arg *ImageGetDiskFormatAttributeType, val ImageGetDiskFormatRetType) {
*arg = &val
}
type ImageGetDiskFormatArgType = string
type ImageGetDiskFormatRetType = string
/*
types and functions for id
*/
// isNotNullableString
type ImageGetIdAttributeType = *string
func getImageGetIdAttributeTypeOk(arg ImageGetIdAttributeType) (ret ImageGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetIdAttributeType(arg *ImageGetIdAttributeType, val ImageGetIdRetType) {
*arg = &val
}
type ImageGetIdArgType = string
type ImageGetIdRetType = string
/*
types and functions for importProgress
*/
// isLong
type ImageGetImportProgressAttributeType = *int64
type ImageGetImportProgressArgType = int64
type ImageGetImportProgressRetType = int64
func getImageGetImportProgressAttributeTypeOk(arg ImageGetImportProgressAttributeType) (ret ImageGetImportProgressRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetImportProgressAttributeType(arg *ImageGetImportProgressAttributeType, val ImageGetImportProgressRetType) {
*arg = &val
}
/*
types and functions for labels
*/
// isFreeform
type ImageGetLabelsAttributeType = *map[string]interface{}
type ImageGetLabelsArgType = map[string]interface{}
type ImageGetLabelsRetType = map[string]interface{}
func getImageGetLabelsAttributeTypeOk(arg ImageGetLabelsAttributeType) (ret ImageGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetLabelsAttributeType(arg *ImageGetLabelsAttributeType, val ImageGetLabelsRetType) {
*arg = &val
}
/*
types and functions for minDiskSize
*/
// isLong
type ImageGetMinDiskSizeAttributeType = *int64
type ImageGetMinDiskSizeArgType = int64
type ImageGetMinDiskSizeRetType = int64
func getImageGetMinDiskSizeAttributeTypeOk(arg ImageGetMinDiskSizeAttributeType) (ret ImageGetMinDiskSizeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetMinDiskSizeAttributeType(arg *ImageGetMinDiskSizeAttributeType, val ImageGetMinDiskSizeRetType) {
*arg = &val
}
/*
types and functions for minRam
*/
// isLong
type ImageGetMinRamAttributeType = *int64
type ImageGetMinRamArgType = int64
type ImageGetMinRamRetType = int64
func getImageGetMinRamAttributeTypeOk(arg ImageGetMinRamAttributeType) (ret ImageGetMinRamRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetMinRamAttributeType(arg *ImageGetMinRamAttributeType, val ImageGetMinRamRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type ImageGetNameAttributeType = *string
func getImageGetNameAttributeTypeOk(arg ImageGetNameAttributeType) (ret ImageGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetNameAttributeType(arg *ImageGetNameAttributeType, val ImageGetNameRetType) {
*arg = &val
}
type ImageGetNameArgType = string
type ImageGetNameRetType = string
/*
types and functions for owner
*/
// isNotNullableString
type ImageGetOwnerAttributeType = *string
func getImageGetOwnerAttributeTypeOk(arg ImageGetOwnerAttributeType) (ret ImageGetOwnerRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetOwnerAttributeType(arg *ImageGetOwnerAttributeType, val ImageGetOwnerRetType) {
*arg = &val
}
type ImageGetOwnerArgType = string
type ImageGetOwnerRetType = string
/*
types and functions for protected
*/
// isBoolean
type ImagegetProtectedAttributeType = *bool
type ImagegetProtectedArgType = bool
type ImagegetProtectedRetType = bool
func getImagegetProtectedAttributeTypeOk(arg ImagegetProtectedAttributeType) (ret ImagegetProtectedRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImagegetProtectedAttributeType(arg *ImagegetProtectedAttributeType, val ImagegetProtectedRetType) {
*arg = &val
}
/*
types and functions for scope
*/
// isNotNullableString
type ImageGetScopeAttributeType = *string
func getImageGetScopeAttributeTypeOk(arg ImageGetScopeAttributeType) (ret ImageGetScopeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetScopeAttributeType(arg *ImageGetScopeAttributeType, val ImageGetScopeRetType) {
*arg = &val
}
type ImageGetScopeArgType = string
type ImageGetScopeRetType = string
/*
types and functions for size
*/
// isLong
type ImageGetSizeAttributeType = *int64
type ImageGetSizeArgType = int64
type ImageGetSizeRetType = int64
func getImageGetSizeAttributeTypeOk(arg ImageGetSizeAttributeType) (ret ImageGetSizeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetSizeAttributeType(arg *ImageGetSizeAttributeType, val ImageGetSizeRetType) {
*arg = &val
}
/*
types and functions for status
*/
// isNotNullableString
type ImageGetStatusAttributeType = *string
func getImageGetStatusAttributeTypeOk(arg ImageGetStatusAttributeType) (ret ImageGetStatusRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetStatusAttributeType(arg *ImageGetStatusAttributeType, val ImageGetStatusRetType) {
*arg = &val
}
type ImageGetStatusArgType = string
type ImageGetStatusRetType = string
/*
types and functions for updatedAt
*/
// isDateTime
type ImageGetUpdatedAtAttributeType = *time.Time
type ImageGetUpdatedAtArgType = time.Time
type ImageGetUpdatedAtRetType = time.Time
func getImageGetUpdatedAtAttributeTypeOk(arg ImageGetUpdatedAtAttributeType) (ret ImageGetUpdatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setImageGetUpdatedAtAttributeType(arg *ImageGetUpdatedAtAttributeType, val ImageGetUpdatedAtRetType) {
*arg = &val
}
// Image Object that represents an Image and its parameters. Used for Creating and returning (get/list).
type Image struct {
Agent ImageGetAgentAttributeType `json:"agent,omitempty"`
Checksum ImageGetChecksumAttributeType `json:"checksum,omitempty"`
Config ImageGetConfigAttributeType `json:"config,omitempty"`
// Date-time when resource was created.
CreatedAt ImageGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`.
// REQUIRED
DiskFormat ImageGetDiskFormatAttributeType `json:"diskFormat" required:"true"`
// Universally Unique Identifier (UUID).
Id ImageGetIdAttributeType `json:"id,omitempty"`
// Indicates Image Import Progress in percent.
ImportProgress ImageGetImportProgressAttributeType `json:"importProgress,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 ImageGetLabelsAttributeType `json:"labels,omitempty"`
// Size in Gigabyte.
MinDiskSize ImageGetMinDiskSizeAttributeType `json:"minDiskSize,omitempty"`
// Size in Megabyte.
MinRam ImageGetMinRamAttributeType `json:"minRam,omitempty"`
// The name for a General Object. Matches Names and also UUIDs.
// REQUIRED
Name ImageGetNameAttributeType `json:"name" required:"true"`
// Universally Unique Identifier (UUID).
Owner ImageGetOwnerAttributeType `json:"owner,omitempty"`
// When true the image is prevented from being deleted.
Protected ImagegetProtectedAttributeType `json:"protected,omitempty"`
// Scope of an Image. Possible values: `public`, `local`, `projects`, `organization`.
Scope ImageGetScopeAttributeType `json:"scope,omitempty"`
// Size in bytes.
Size ImageGetSizeAttributeType `json:"size,omitempty"`
// The status of an image object. Possible values: `AVAILABLE`, `CREATING`, `DEACTIVATED`, `DELETED`, `DELETING`, `ERROR`.
Status ImageGetStatusAttributeType `json:"status,omitempty"`
// Date-time when resource was last updated.
UpdatedAt ImageGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
}
type _Image Image
// NewImage instantiates a new Image 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 NewImage(diskFormat ImageGetDiskFormatArgType, name ImageGetNameArgType) *Image {
this := Image{}
setImageGetDiskFormatAttributeType(&this.DiskFormat, diskFormat)
setImageGetNameAttributeType(&this.Name, name)
return &this
}
// NewImageWithDefaults instantiates a new Image 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 NewImageWithDefaults() *Image {
this := Image{}
return &this
}
// GetAgent returns the Agent field value if set, zero value otherwise.
func (o *Image) GetAgent() (res ImageGetAgentRetType) {
res, _ = o.GetAgentOk()
return
}
// GetAgentOk returns a tuple with the Agent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Image) GetAgentOk() (ret ImageGetAgentRetType, ok bool) {
return getImageGetAgentAttributeTypeOk(o.Agent)
}
// HasAgent returns a boolean if a field has been set.
func (o *Image) HasAgent() bool {
_, ok := o.GetAgentOk()
return ok
}
// SetAgent gets a reference to the given ImageAgent and assigns it to the Agent field.
func (o *Image) SetAgent(v ImageGetAgentRetType) {
setImageGetAgentAttributeType(&o.Agent, v)
}
// GetChecksum returns the Checksum field value if set, zero value otherwise.
func (o *Image) GetChecksum() (res ImageGetChecksumRetType) {
res, _ = o.GetChecksumOk()
return
}
// GetChecksumOk returns a tuple with the Checksum field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Image) GetChecksumOk() (ret ImageGetChecksumRetType, ok bool) {
return getImageGetChecksumAttributeTypeOk(o.Checksum)
}
// HasChecksum returns a boolean if a field has been set.
func (o *Image) HasChecksum() bool {
_, ok := o.GetChecksumOk()
return ok
}
// SetChecksum gets a reference to the given ImageChecksum and assigns it to the Checksum field.
func (o *Image) SetChecksum(v ImageGetChecksumRetType) {
setImageGetChecksumAttributeType(&o.Checksum, v)
}
// GetConfig returns the Config field value if set, zero value otherwise.
func (o *Image) GetConfig() (res ImageGetConfigRetType) {
res, _ = o.GetConfigOk()
return
}
// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Image) GetConfigOk() (ret ImageGetConfigRetType, ok bool) {
return getImageGetConfigAttributeTypeOk(o.Config)
}
// HasConfig returns a boolean if a field has been set.
func (o *Image) HasConfig() bool {
_, ok := o.GetConfigOk()
return ok
}
// SetConfig gets a reference to the given ImageConfig and assigns it to the Config field.
func (o *Image) SetConfig(v ImageGetConfigRetType) {
setImageGetConfigAttributeType(&o.Config, v)
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *Image) GetCreatedAt() (res ImageGetCreatedAtRetType) {
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 *Image) GetCreatedAtOk() (ret ImageGetCreatedAtRetType, ok bool) {
return getImageGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *Image) 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 *Image) SetCreatedAt(v ImageGetCreatedAtRetType) {
setImageGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetDiskFormat returns the DiskFormat field value
func (o *Image) GetDiskFormat() (ret ImageGetDiskFormatRetType) {
ret, _ = o.GetDiskFormatOk()
return ret
}
// GetDiskFormatOk returns a tuple with the DiskFormat field value
// and a boolean to check if the value has been set.
func (o *Image) GetDiskFormatOk() (ret ImageGetDiskFormatRetType, ok bool) {
return getImageGetDiskFormatAttributeTypeOk(o.DiskFormat)
}
// SetDiskFormat sets field value
func (o *Image) SetDiskFormat(v ImageGetDiskFormatRetType) {
setImageGetDiskFormatAttributeType(&o.DiskFormat, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Image) GetId() (res ImageGetIdRetType) {
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 *Image) GetIdOk() (ret ImageGetIdRetType, ok bool) {
return getImageGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *Image) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *Image) SetId(v ImageGetIdRetType) {
setImageGetIdAttributeType(&o.Id, v)
}
// GetImportProgress returns the ImportProgress field value if set, zero value otherwise.
func (o *Image) GetImportProgress() (res ImageGetImportProgressRetType) {
res, _ = o.GetImportProgressOk()
return
}
// GetImportProgressOk returns a tuple with the ImportProgress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Image) GetImportProgressOk() (ret ImageGetImportProgressRetType, ok bool) {
return getImageGetImportProgressAttributeTypeOk(o.ImportProgress)
}
// HasImportProgress returns a boolean if a field has been set.
func (o *Image) HasImportProgress() bool {
_, ok := o.GetImportProgressOk()
return ok
}
// SetImportProgress gets a reference to the given int64 and assigns it to the ImportProgress field.
func (o *Image) SetImportProgress(v ImageGetImportProgressRetType) {
setImageGetImportProgressAttributeType(&o.ImportProgress, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *Image) GetLabels() (res ImageGetLabelsRetType) {
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 *Image) GetLabelsOk() (ret ImageGetLabelsRetType, ok bool) {
return getImageGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *Image) 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 *Image) SetLabels(v ImageGetLabelsRetType) {
setImageGetLabelsAttributeType(&o.Labels, v)
}
// GetMinDiskSize returns the MinDiskSize field value if set, zero value otherwise.
func (o *Image) GetMinDiskSize() (res ImageGetMinDiskSizeRetType) {
res, _ = o.GetMinDiskSizeOk()
return
}
// GetMinDiskSizeOk returns a tuple with the MinDiskSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Image) GetMinDiskSizeOk() (ret ImageGetMinDiskSizeRetType, ok bool) {
return getImageGetMinDiskSizeAttributeTypeOk(o.MinDiskSize)
}
// HasMinDiskSize returns a boolean if a field has been set.
func (o *Image) HasMinDiskSize() bool {
_, ok := o.GetMinDiskSizeOk()
return ok
}
// SetMinDiskSize gets a reference to the given int64 and assigns it to the MinDiskSize field.
func (o *Image) SetMinDiskSize(v ImageGetMinDiskSizeRetType) {
setImageGetMinDiskSizeAttributeType(&o.MinDiskSize, v)
}
// GetMinRam returns the MinRam field value if set, zero value otherwise.
func (o *Image) GetMinRam() (res ImageGetMinRamRetType) {
res, _ = o.GetMinRamOk()
return
}
// GetMinRamOk returns a tuple with the MinRam field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Image) GetMinRamOk() (ret ImageGetMinRamRetType, ok bool) {
return getImageGetMinRamAttributeTypeOk(o.MinRam)
}
// HasMinRam returns a boolean if a field has been set.
func (o *Image) HasMinRam() bool {
_, ok := o.GetMinRamOk()
return ok
}
// SetMinRam gets a reference to the given int64 and assigns it to the MinRam field.
func (o *Image) SetMinRam(v ImageGetMinRamRetType) {
setImageGetMinRamAttributeType(&o.MinRam, v)
}
// GetName returns the Name field value
func (o *Image) GetName() (ret ImageGetNameRetType) {
ret, _ = o.GetNameOk()
return ret
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *Image) GetNameOk() (ret ImageGetNameRetType, ok bool) {
return getImageGetNameAttributeTypeOk(o.Name)
}
// SetName sets field value
func (o *Image) SetName(v ImageGetNameRetType) {
setImageGetNameAttributeType(&o.Name, v)
}
// GetOwner returns the Owner field value if set, zero value otherwise.
func (o *Image) GetOwner() (res ImageGetOwnerRetType) {
res, _ = o.GetOwnerOk()
return
}
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Image) GetOwnerOk() (ret ImageGetOwnerRetType, ok bool) {
return getImageGetOwnerAttributeTypeOk(o.Owner)
}
// HasOwner returns a boolean if a field has been set.
func (o *Image) HasOwner() bool {
_, ok := o.GetOwnerOk()
return ok
}
// SetOwner gets a reference to the given string and assigns it to the Owner field.
func (o *Image) SetOwner(v ImageGetOwnerRetType) {
setImageGetOwnerAttributeType(&o.Owner, v)
}
// GetProtected returns the Protected field value if set, zero value otherwise.
func (o *Image) GetProtected() (res ImagegetProtectedRetType) {
res, _ = o.GetProtectedOk()
return
}
// GetProtectedOk returns a tuple with the Protected field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Image) GetProtectedOk() (ret ImagegetProtectedRetType, ok bool) {
return getImagegetProtectedAttributeTypeOk(o.Protected)
}
// HasProtected returns a boolean if a field has been set.
func (o *Image) HasProtected() bool {
_, ok := o.GetProtectedOk()
return ok
}
// SetProtected gets a reference to the given bool and assigns it to the Protected field.
func (o *Image) SetProtected(v ImagegetProtectedRetType) {
setImagegetProtectedAttributeType(&o.Protected, v)
}
// GetScope returns the Scope field value if set, zero value otherwise.
func (o *Image) GetScope() (res ImageGetScopeRetType) {
res, _ = o.GetScopeOk()
return
}
// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Image) GetScopeOk() (ret ImageGetScopeRetType, ok bool) {
return getImageGetScopeAttributeTypeOk(o.Scope)
}
// HasScope returns a boolean if a field has been set.
func (o *Image) HasScope() bool {
_, ok := o.GetScopeOk()
return ok
}
// SetScope gets a reference to the given string and assigns it to the Scope field.
func (o *Image) SetScope(v ImageGetScopeRetType) {
setImageGetScopeAttributeType(&o.Scope, v)
}
// GetSize returns the Size field value if set, zero value otherwise.
func (o *Image) GetSize() (res ImageGetSizeRetType) {
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 *Image) GetSizeOk() (ret ImageGetSizeRetType, ok bool) {
return getImageGetSizeAttributeTypeOk(o.Size)
}
// HasSize returns a boolean if a field has been set.
func (o *Image) HasSize() bool {
_, ok := o.GetSizeOk()
return ok
}
// SetSize gets a reference to the given int64 and assigns it to the Size field.
func (o *Image) SetSize(v ImageGetSizeRetType) {
setImageGetSizeAttributeType(&o.Size, v)
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *Image) GetStatus() (res ImageGetStatusRetType) {
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 *Image) GetStatusOk() (ret ImageGetStatusRetType, ok bool) {
return getImageGetStatusAttributeTypeOk(o.Status)
}
// HasStatus returns a boolean if a field has been set.
func (o *Image) HasStatus() bool {
_, ok := o.GetStatusOk()
return ok
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *Image) SetStatus(v ImageGetStatusRetType) {
setImageGetStatusAttributeType(&o.Status, v)
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *Image) GetUpdatedAt() (res ImageGetUpdatedAtRetType) {
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 *Image) GetUpdatedAtOk() (ret ImageGetUpdatedAtRetType, ok bool) {
return getImageGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *Image) 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 *Image) SetUpdatedAt(v ImageGetUpdatedAtRetType) {
setImageGetUpdatedAtAttributeType(&o.UpdatedAt, v)
}
func (o Image) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getImageGetAgentAttributeTypeOk(o.Agent); ok {
toSerialize["Agent"] = val
}
if val, ok := getImageGetChecksumAttributeTypeOk(o.Checksum); ok {
toSerialize["Checksum"] = val
}
if val, ok := getImageGetConfigAttributeTypeOk(o.Config); ok {
toSerialize["Config"] = val
}
if val, ok := getImageGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getImageGetDiskFormatAttributeTypeOk(o.DiskFormat); ok {
toSerialize["DiskFormat"] = val
}
if val, ok := getImageGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getImageGetImportProgressAttributeTypeOk(o.ImportProgress); ok {
toSerialize["ImportProgress"] = val
}
if val, ok := getImageGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getImageGetMinDiskSizeAttributeTypeOk(o.MinDiskSize); ok {
toSerialize["MinDiskSize"] = val
}
if val, ok := getImageGetMinRamAttributeTypeOk(o.MinRam); ok {
toSerialize["MinRam"] = val
}
if val, ok := getImageGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getImageGetOwnerAttributeTypeOk(o.Owner); ok {
toSerialize["Owner"] = val
}
if val, ok := getImagegetProtectedAttributeTypeOk(o.Protected); ok {
toSerialize["Protected"] = val
}
if val, ok := getImageGetScopeAttributeTypeOk(o.Scope); ok {
toSerialize["Scope"] = val
}
if val, ok := getImageGetSizeAttributeTypeOk(o.Size); ok {
toSerialize["Size"] = val
}
if val, ok := getImageGetStatusAttributeTypeOk(o.Status); ok {
toSerialize["Status"] = val
}
if val, ok := getImageGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
toSerialize["UpdatedAt"] = val
}
return toSerialize, nil
}
type NullableImage struct {
value *Image
isSet bool
}
func (v NullableImage) Get() *Image {
return v.value
}
func (v *NullableImage) Set(val *Image) {
v.value = val
v.isSet = true
}
func (v NullableImage) IsSet() bool {
return v.isSet
}
func (v *NullableImage) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableImage(val *Image) *NullableImage {
return &NullableImage{value: val, isSet: true}
}
func (v NullableImage) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableImage) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}