-
Notifications
You must be signed in to change notification settings - Fork 2
/
model_engine.go
756 lines (650 loc) · 22.2 KB
/
model_engine.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
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
/*
Delphix API Gateway
Delphix API Gateway API
API version: 1.0
Contact: support@delphix.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package delphix_dct_api
import (
"encoding/json"
"time"
)
// Engine A Delphix Virtualization or Masking Engine.
type Engine struct {
// The Engine object entity ID.
Id *string `json:"id,omitempty"`
// The unique identifier generated by this engine.
Uuid NullableString `json:"uuid,omitempty"`
// The type of this engine.
Type NullableString `json:"type,omitempty"`
// The engine version.
Version NullableString `json:"version,omitempty"`
// The name of this engine.
Name *string `json:"name,omitempty"`
// The hostname of this engine.
Hostname *string `json:"hostname,omitempty"`
// The registration status of this engine.
RegistrationStatus NullableString `json:"registration_status,omitempty"`
// The connection status of this engine.
ConnectionStatus NullableString `json:"connection_status,omitempty"`
// The last time a connection was established with this engine.
LastConnectionTime NullableTime `json:"last_connection_time,omitempty"`
// The total amount of storage allocated to the engine's boot partition, in bytes.
BootStorageCapacity NullableInt64 `json:"boot_storage_capacity,omitempty"`
// The total number of CPU cores on this engine.
CpuCoreCount NullableInt32 `json:"cpu_core_count,omitempty"`
// The model of the processors on this engine.
CpuType NullableString `json:"cpu_type,omitempty"`
// The total amount of memory on this engine, in bytes.
MemorySize NullableInt64 `json:"memory_size,omitempty"`
// The total amount of storage allocated for engine objects and system metadata, in bytes.
DataStorageCapacity NullableInt64 `json:"data_storage_capacity,omitempty"`
// The amount of storage used by engine objects and system metadata, in bytes.
DataStorageUsed NullableInt64 `json:"data_storage_used,omitempty"`
}
// NewEngine instantiates a new Engine 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 NewEngine() *Engine {
this := Engine{}
return &this
}
// NewEngineWithDefaults instantiates a new Engine 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 NewEngineWithDefaults() *Engine {
this := Engine{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Engine) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// 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 *Engine) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *Engine) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *Engine) SetId(v string) {
o.Id = &v
}
// GetUuid returns the Uuid field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Engine) GetUuid() string {
if o == nil || o.Uuid.Get() == nil {
var ret string
return ret
}
return *o.Uuid.Get()
}
// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Engine) GetUuidOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Uuid.Get(), o.Uuid.IsSet()
}
// HasUuid returns a boolean if a field has been set.
func (o *Engine) HasUuid() bool {
if o != nil && o.Uuid.IsSet() {
return true
}
return false
}
// SetUuid gets a reference to the given NullableString and assigns it to the Uuid field.
func (o *Engine) SetUuid(v string) {
o.Uuid.Set(&v)
}
// SetUuidNil sets the value for Uuid to be an explicit nil
func (o *Engine) SetUuidNil() {
o.Uuid.Set(nil)
}
// UnsetUuid ensures that no value is present for Uuid, not even an explicit nil
func (o *Engine) UnsetUuid() {
o.Uuid.Unset()
}
// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Engine) GetType() string {
if o == nil || o.Type.Get() == nil {
var ret string
return ret
}
return *o.Type.Get()
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Engine) GetTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Type.Get(), o.Type.IsSet()
}
// HasType returns a boolean if a field has been set.
func (o *Engine) HasType() bool {
if o != nil && o.Type.IsSet() {
return true
}
return false
}
// SetType gets a reference to the given NullableString and assigns it to the Type field.
func (o *Engine) SetType(v string) {
o.Type.Set(&v)
}
// SetTypeNil sets the value for Type to be an explicit nil
func (o *Engine) SetTypeNil() {
o.Type.Set(nil)
}
// UnsetType ensures that no value is present for Type, not even an explicit nil
func (o *Engine) UnsetType() {
o.Type.Unset()
}
// GetVersion returns the Version field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Engine) GetVersion() string {
if o == nil || o.Version.Get() == nil {
var ret string
return ret
}
return *o.Version.Get()
}
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Engine) GetVersionOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Version.Get(), o.Version.IsSet()
}
// HasVersion returns a boolean if a field has been set.
func (o *Engine) HasVersion() bool {
if o != nil && o.Version.IsSet() {
return true
}
return false
}
// SetVersion gets a reference to the given NullableString and assigns it to the Version field.
func (o *Engine) SetVersion(v string) {
o.Version.Set(&v)
}
// SetVersionNil sets the value for Version to be an explicit nil
func (o *Engine) SetVersionNil() {
o.Version.Set(nil)
}
// UnsetVersion ensures that no value is present for Version, not even an explicit nil
func (o *Engine) UnsetVersion() {
o.Version.Unset()
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *Engine) GetName() string {
if o == nil || o.Name == nil {
var ret string
return ret
}
return *o.Name
}
// 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 *Engine) GetNameOk() (*string, bool) {
if o == nil || o.Name == nil {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *Engine) HasName() bool {
if o != nil && o.Name != nil {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *Engine) SetName(v string) {
o.Name = &v
}
// GetHostname returns the Hostname field value if set, zero value otherwise.
func (o *Engine) GetHostname() string {
if o == nil || o.Hostname == nil {
var ret string
return ret
}
return *o.Hostname
}
// GetHostnameOk returns a tuple with the Hostname field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Engine) GetHostnameOk() (*string, bool) {
if o == nil || o.Hostname == nil {
return nil, false
}
return o.Hostname, true
}
// HasHostname returns a boolean if a field has been set.
func (o *Engine) HasHostname() bool {
if o != nil && o.Hostname != nil {
return true
}
return false
}
// SetHostname gets a reference to the given string and assigns it to the Hostname field.
func (o *Engine) SetHostname(v string) {
o.Hostname = &v
}
// GetRegistrationStatus returns the RegistrationStatus field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Engine) GetRegistrationStatus() string {
if o == nil || o.RegistrationStatus.Get() == nil {
var ret string
return ret
}
return *o.RegistrationStatus.Get()
}
// GetRegistrationStatusOk returns a tuple with the RegistrationStatus field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Engine) GetRegistrationStatusOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.RegistrationStatus.Get(), o.RegistrationStatus.IsSet()
}
// HasRegistrationStatus returns a boolean if a field has been set.
func (o *Engine) HasRegistrationStatus() bool {
if o != nil && o.RegistrationStatus.IsSet() {
return true
}
return false
}
// SetRegistrationStatus gets a reference to the given NullableString and assigns it to the RegistrationStatus field.
func (o *Engine) SetRegistrationStatus(v string) {
o.RegistrationStatus.Set(&v)
}
// SetRegistrationStatusNil sets the value for RegistrationStatus to be an explicit nil
func (o *Engine) SetRegistrationStatusNil() {
o.RegistrationStatus.Set(nil)
}
// UnsetRegistrationStatus ensures that no value is present for RegistrationStatus, not even an explicit nil
func (o *Engine) UnsetRegistrationStatus() {
o.RegistrationStatus.Unset()
}
// GetConnectionStatus returns the ConnectionStatus field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Engine) GetConnectionStatus() string {
if o == nil || o.ConnectionStatus.Get() == nil {
var ret string
return ret
}
return *o.ConnectionStatus.Get()
}
// GetConnectionStatusOk returns a tuple with the ConnectionStatus field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Engine) GetConnectionStatusOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ConnectionStatus.Get(), o.ConnectionStatus.IsSet()
}
// HasConnectionStatus returns a boolean if a field has been set.
func (o *Engine) HasConnectionStatus() bool {
if o != nil && o.ConnectionStatus.IsSet() {
return true
}
return false
}
// SetConnectionStatus gets a reference to the given NullableString and assigns it to the ConnectionStatus field.
func (o *Engine) SetConnectionStatus(v string) {
o.ConnectionStatus.Set(&v)
}
// SetConnectionStatusNil sets the value for ConnectionStatus to be an explicit nil
func (o *Engine) SetConnectionStatusNil() {
o.ConnectionStatus.Set(nil)
}
// UnsetConnectionStatus ensures that no value is present for ConnectionStatus, not even an explicit nil
func (o *Engine) UnsetConnectionStatus() {
o.ConnectionStatus.Unset()
}
// GetLastConnectionTime returns the LastConnectionTime field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Engine) GetLastConnectionTime() time.Time {
if o == nil || o.LastConnectionTime.Get() == nil {
var ret time.Time
return ret
}
return *o.LastConnectionTime.Get()
}
// GetLastConnectionTimeOk returns a tuple with the LastConnectionTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Engine) GetLastConnectionTimeOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.LastConnectionTime.Get(), o.LastConnectionTime.IsSet()
}
// HasLastConnectionTime returns a boolean if a field has been set.
func (o *Engine) HasLastConnectionTime() bool {
if o != nil && o.LastConnectionTime.IsSet() {
return true
}
return false
}
// SetLastConnectionTime gets a reference to the given NullableTime and assigns it to the LastConnectionTime field.
func (o *Engine) SetLastConnectionTime(v time.Time) {
o.LastConnectionTime.Set(&v)
}
// SetLastConnectionTimeNil sets the value for LastConnectionTime to be an explicit nil
func (o *Engine) SetLastConnectionTimeNil() {
o.LastConnectionTime.Set(nil)
}
// UnsetLastConnectionTime ensures that no value is present for LastConnectionTime, not even an explicit nil
func (o *Engine) UnsetLastConnectionTime() {
o.LastConnectionTime.Unset()
}
// GetBootStorageCapacity returns the BootStorageCapacity field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Engine) GetBootStorageCapacity() int64 {
if o == nil || o.BootStorageCapacity.Get() == nil {
var ret int64
return ret
}
return *o.BootStorageCapacity.Get()
}
// GetBootStorageCapacityOk returns a tuple with the BootStorageCapacity field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Engine) GetBootStorageCapacityOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.BootStorageCapacity.Get(), o.BootStorageCapacity.IsSet()
}
// HasBootStorageCapacity returns a boolean if a field has been set.
func (o *Engine) HasBootStorageCapacity() bool {
if o != nil && o.BootStorageCapacity.IsSet() {
return true
}
return false
}
// SetBootStorageCapacity gets a reference to the given NullableInt64 and assigns it to the BootStorageCapacity field.
func (o *Engine) SetBootStorageCapacity(v int64) {
o.BootStorageCapacity.Set(&v)
}
// SetBootStorageCapacityNil sets the value for BootStorageCapacity to be an explicit nil
func (o *Engine) SetBootStorageCapacityNil() {
o.BootStorageCapacity.Set(nil)
}
// UnsetBootStorageCapacity ensures that no value is present for BootStorageCapacity, not even an explicit nil
func (o *Engine) UnsetBootStorageCapacity() {
o.BootStorageCapacity.Unset()
}
// GetCpuCoreCount returns the CpuCoreCount field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Engine) GetCpuCoreCount() int32 {
if o == nil || o.CpuCoreCount.Get() == nil {
var ret int32
return ret
}
return *o.CpuCoreCount.Get()
}
// GetCpuCoreCountOk returns a tuple with the CpuCoreCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Engine) GetCpuCoreCountOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.CpuCoreCount.Get(), o.CpuCoreCount.IsSet()
}
// HasCpuCoreCount returns a boolean if a field has been set.
func (o *Engine) HasCpuCoreCount() bool {
if o != nil && o.CpuCoreCount.IsSet() {
return true
}
return false
}
// SetCpuCoreCount gets a reference to the given NullableInt32 and assigns it to the CpuCoreCount field.
func (o *Engine) SetCpuCoreCount(v int32) {
o.CpuCoreCount.Set(&v)
}
// SetCpuCoreCountNil sets the value for CpuCoreCount to be an explicit nil
func (o *Engine) SetCpuCoreCountNil() {
o.CpuCoreCount.Set(nil)
}
// UnsetCpuCoreCount ensures that no value is present for CpuCoreCount, not even an explicit nil
func (o *Engine) UnsetCpuCoreCount() {
o.CpuCoreCount.Unset()
}
// GetCpuType returns the CpuType field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Engine) GetCpuType() string {
if o == nil || o.CpuType.Get() == nil {
var ret string
return ret
}
return *o.CpuType.Get()
}
// GetCpuTypeOk returns a tuple with the CpuType field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Engine) GetCpuTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.CpuType.Get(), o.CpuType.IsSet()
}
// HasCpuType returns a boolean if a field has been set.
func (o *Engine) HasCpuType() bool {
if o != nil && o.CpuType.IsSet() {
return true
}
return false
}
// SetCpuType gets a reference to the given NullableString and assigns it to the CpuType field.
func (o *Engine) SetCpuType(v string) {
o.CpuType.Set(&v)
}
// SetCpuTypeNil sets the value for CpuType to be an explicit nil
func (o *Engine) SetCpuTypeNil() {
o.CpuType.Set(nil)
}
// UnsetCpuType ensures that no value is present for CpuType, not even an explicit nil
func (o *Engine) UnsetCpuType() {
o.CpuType.Unset()
}
// GetMemorySize returns the MemorySize field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Engine) GetMemorySize() int64 {
if o == nil || o.MemorySize.Get() == nil {
var ret int64
return ret
}
return *o.MemorySize.Get()
}
// GetMemorySizeOk returns a tuple with the MemorySize field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Engine) GetMemorySizeOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.MemorySize.Get(), o.MemorySize.IsSet()
}
// HasMemorySize returns a boolean if a field has been set.
func (o *Engine) HasMemorySize() bool {
if o != nil && o.MemorySize.IsSet() {
return true
}
return false
}
// SetMemorySize gets a reference to the given NullableInt64 and assigns it to the MemorySize field.
func (o *Engine) SetMemorySize(v int64) {
o.MemorySize.Set(&v)
}
// SetMemorySizeNil sets the value for MemorySize to be an explicit nil
func (o *Engine) SetMemorySizeNil() {
o.MemorySize.Set(nil)
}
// UnsetMemorySize ensures that no value is present for MemorySize, not even an explicit nil
func (o *Engine) UnsetMemorySize() {
o.MemorySize.Unset()
}
// GetDataStorageCapacity returns the DataStorageCapacity field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Engine) GetDataStorageCapacity() int64 {
if o == nil || o.DataStorageCapacity.Get() == nil {
var ret int64
return ret
}
return *o.DataStorageCapacity.Get()
}
// GetDataStorageCapacityOk returns a tuple with the DataStorageCapacity field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Engine) GetDataStorageCapacityOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.DataStorageCapacity.Get(), o.DataStorageCapacity.IsSet()
}
// HasDataStorageCapacity returns a boolean if a field has been set.
func (o *Engine) HasDataStorageCapacity() bool {
if o != nil && o.DataStorageCapacity.IsSet() {
return true
}
return false
}
// SetDataStorageCapacity gets a reference to the given NullableInt64 and assigns it to the DataStorageCapacity field.
func (o *Engine) SetDataStorageCapacity(v int64) {
o.DataStorageCapacity.Set(&v)
}
// SetDataStorageCapacityNil sets the value for DataStorageCapacity to be an explicit nil
func (o *Engine) SetDataStorageCapacityNil() {
o.DataStorageCapacity.Set(nil)
}
// UnsetDataStorageCapacity ensures that no value is present for DataStorageCapacity, not even an explicit nil
func (o *Engine) UnsetDataStorageCapacity() {
o.DataStorageCapacity.Unset()
}
// GetDataStorageUsed returns the DataStorageUsed field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Engine) GetDataStorageUsed() int64 {
if o == nil || o.DataStorageUsed.Get() == nil {
var ret int64
return ret
}
return *o.DataStorageUsed.Get()
}
// GetDataStorageUsedOk returns a tuple with the DataStorageUsed field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Engine) GetDataStorageUsedOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.DataStorageUsed.Get(), o.DataStorageUsed.IsSet()
}
// HasDataStorageUsed returns a boolean if a field has been set.
func (o *Engine) HasDataStorageUsed() bool {
if o != nil && o.DataStorageUsed.IsSet() {
return true
}
return false
}
// SetDataStorageUsed gets a reference to the given NullableInt64 and assigns it to the DataStorageUsed field.
func (o *Engine) SetDataStorageUsed(v int64) {
o.DataStorageUsed.Set(&v)
}
// SetDataStorageUsedNil sets the value for DataStorageUsed to be an explicit nil
func (o *Engine) SetDataStorageUsedNil() {
o.DataStorageUsed.Set(nil)
}
// UnsetDataStorageUsed ensures that no value is present for DataStorageUsed, not even an explicit nil
func (o *Engine) UnsetDataStorageUsed() {
o.DataStorageUsed.Unset()
}
func (o Engine) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if o.Uuid.IsSet() {
toSerialize["uuid"] = o.Uuid.Get()
}
if o.Type.IsSet() {
toSerialize["type"] = o.Type.Get()
}
if o.Version.IsSet() {
toSerialize["version"] = o.Version.Get()
}
if o.Name != nil {
toSerialize["name"] = o.Name
}
if o.Hostname != nil {
toSerialize["hostname"] = o.Hostname
}
if o.RegistrationStatus.IsSet() {
toSerialize["registration_status"] = o.RegistrationStatus.Get()
}
if o.ConnectionStatus.IsSet() {
toSerialize["connection_status"] = o.ConnectionStatus.Get()
}
if o.LastConnectionTime.IsSet() {
toSerialize["last_connection_time"] = o.LastConnectionTime.Get()
}
if o.BootStorageCapacity.IsSet() {
toSerialize["boot_storage_capacity"] = o.BootStorageCapacity.Get()
}
if o.CpuCoreCount.IsSet() {
toSerialize["cpu_core_count"] = o.CpuCoreCount.Get()
}
if o.CpuType.IsSet() {
toSerialize["cpu_type"] = o.CpuType.Get()
}
if o.MemorySize.IsSet() {
toSerialize["memory_size"] = o.MemorySize.Get()
}
if o.DataStorageCapacity.IsSet() {
toSerialize["data_storage_capacity"] = o.DataStorageCapacity.Get()
}
if o.DataStorageUsed.IsSet() {
toSerialize["data_storage_used"] = o.DataStorageUsed.Get()
}
return json.Marshal(toSerialize)
}
type NullableEngine struct {
value *Engine
isSet bool
}
func (v NullableEngine) Get() *Engine {
return v.value
}
func (v *NullableEngine) Set(val *Engine) {
v.value = val
v.isSet = true
}
func (v NullableEngine) IsSet() bool {
return v.isSet
}
func (v *NullableEngine) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEngine(val *Engine) *NullableEngine {
return &NullableEngine{value: val, isSet: true}
}
func (v NullableEngine) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEngine) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}