/
model_create_network_interface_request_content.go
1044 lines (890 loc) · 30 KB
/
model_create_network_interface_request_content.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
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
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
Proxmox
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 2023-01-01
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package proxmox
import (
"encoding/json"
)
// checks if the CreateNetworkInterfaceRequestContent type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateNetworkInterfaceRequestContent{}
// CreateNetworkInterfaceRequestContent struct for CreateNetworkInterfaceRequestContent
type CreateNetworkInterfaceRequestContent struct {
Iface string `json:"iface"`
Type NetworkInterfaceType `json:"type"`
Address *string `json:"address,omitempty"`
Address6 *string `json:"address6,omitempty"`
Autostart *bool `json:"autostart,omitempty"`
BondPrimary *string `json:"bond_primary,omitempty"`
BondMode *NetworkInterfaceBondMode `json:"bond_mode,omitempty"`
BondXmitHashPolicy *NetworkInterfaceBondHashPolicy `json:"bond_xmit_hash_policy,omitempty"`
BridgePorts *string `json:"bridge_ports,omitempty"`
BridgeVlanAware *bool `json:"bridge_vlan_aware,omitempty"`
Cidr *string `json:"cidr,omitempty"`
Cidr6 *string `json:"cidr6,omitempty"`
Comments *string `json:"comments,omitempty"`
Comments6 *string `json:"comments6,omitempty"`
Gateway *string `json:"gateway,omitempty"`
Gateway6 *string `json:"gateway6,omitempty"`
Mtu *float32 `json:"mtu,omitempty"`
Netmask *string `json:"netmask,omitempty"`
Netmask6 *string `json:"netmask6,omitempty"`
OvsBonds *string `json:"ovs_bonds,omitempty"`
OvsOptions *string `json:"ovs_options,omitempty"`
OvsPorts *string `json:"ovs_ports,omitempty"`
OvsTag *float32 `json:"ovs_tag,omitempty"`
OvsBridge *string `json:"ovs_bridge,omitempty"`
Slaves *string `json:"slaves,omitempty"`
VlanId *float32 `json:"vlan-id,omitempty"`
VlanRawDevice *string `json:"vlan-raw-device,omitempty"`
}
// NewCreateNetworkInterfaceRequestContent instantiates a new CreateNetworkInterfaceRequestContent 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 NewCreateNetworkInterfaceRequestContent(iface string, type_ NetworkInterfaceType) *CreateNetworkInterfaceRequestContent {
this := CreateNetworkInterfaceRequestContent{}
this.Iface = iface
this.Type = type_
return &this
}
// NewCreateNetworkInterfaceRequestContentWithDefaults instantiates a new CreateNetworkInterfaceRequestContent 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 NewCreateNetworkInterfaceRequestContentWithDefaults() *CreateNetworkInterfaceRequestContent {
this := CreateNetworkInterfaceRequestContent{}
return &this
}
// GetIface returns the Iface field value
func (o *CreateNetworkInterfaceRequestContent) GetIface() string {
if o == nil {
var ret string
return ret
}
return o.Iface
}
// GetIfaceOk returns a tuple with the Iface field value
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetIfaceOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Iface, true
}
// SetIface sets field value
func (o *CreateNetworkInterfaceRequestContent) SetIface(v string) {
o.Iface = v
}
// GetType returns the Type field value
func (o *CreateNetworkInterfaceRequestContent) GetType() NetworkInterfaceType {
if o == nil {
var ret NetworkInterfaceType
return ret
}
return o.Type
}
// GetTypeOk returns a tuple with the Type field value
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetTypeOk() (*NetworkInterfaceType, bool) {
if o == nil {
return nil, false
}
return &o.Type, true
}
// SetType sets field value
func (o *CreateNetworkInterfaceRequestContent) SetType(v NetworkInterfaceType) {
o.Type = v
}
// GetAddress returns the Address field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetAddress() string {
if o == nil || IsNil(o.Address) {
var ret string
return ret
}
return *o.Address
}
// GetAddressOk returns a tuple with the Address field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetAddressOk() (*string, bool) {
if o == nil || IsNil(o.Address) {
return nil, false
}
return o.Address, true
}
// HasAddress returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasAddress() bool {
if o != nil && !IsNil(o.Address) {
return true
}
return false
}
// SetAddress gets a reference to the given string and assigns it to the Address field.
func (o *CreateNetworkInterfaceRequestContent) SetAddress(v string) {
o.Address = &v
}
// GetAddress6 returns the Address6 field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetAddress6() string {
if o == nil || IsNil(o.Address6) {
var ret string
return ret
}
return *o.Address6
}
// GetAddress6Ok returns a tuple with the Address6 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetAddress6Ok() (*string, bool) {
if o == nil || IsNil(o.Address6) {
return nil, false
}
return o.Address6, true
}
// HasAddress6 returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasAddress6() bool {
if o != nil && !IsNil(o.Address6) {
return true
}
return false
}
// SetAddress6 gets a reference to the given string and assigns it to the Address6 field.
func (o *CreateNetworkInterfaceRequestContent) SetAddress6(v string) {
o.Address6 = &v
}
// GetAutostart returns the Autostart field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetAutostart() bool {
if o == nil || IsNil(o.Autostart) {
var ret bool
return ret
}
return *o.Autostart
}
// GetAutostartOk returns a tuple with the Autostart field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetAutostartOk() (*bool, bool) {
if o == nil || IsNil(o.Autostart) {
return nil, false
}
return o.Autostart, true
}
// HasAutostart returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasAutostart() bool {
if o != nil && !IsNil(o.Autostart) {
return true
}
return false
}
// SetAutostart gets a reference to the given bool and assigns it to the Autostart field.
func (o *CreateNetworkInterfaceRequestContent) SetAutostart(v bool) {
o.Autostart = &v
}
// GetBondPrimary returns the BondPrimary field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetBondPrimary() string {
if o == nil || IsNil(o.BondPrimary) {
var ret string
return ret
}
return *o.BondPrimary
}
// GetBondPrimaryOk returns a tuple with the BondPrimary field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetBondPrimaryOk() (*string, bool) {
if o == nil || IsNil(o.BondPrimary) {
return nil, false
}
return o.BondPrimary, true
}
// HasBondPrimary returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasBondPrimary() bool {
if o != nil && !IsNil(o.BondPrimary) {
return true
}
return false
}
// SetBondPrimary gets a reference to the given string and assigns it to the BondPrimary field.
func (o *CreateNetworkInterfaceRequestContent) SetBondPrimary(v string) {
o.BondPrimary = &v
}
// GetBondMode returns the BondMode field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetBondMode() NetworkInterfaceBondMode {
if o == nil || IsNil(o.BondMode) {
var ret NetworkInterfaceBondMode
return ret
}
return *o.BondMode
}
// GetBondModeOk returns a tuple with the BondMode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetBondModeOk() (*NetworkInterfaceBondMode, bool) {
if o == nil || IsNil(o.BondMode) {
return nil, false
}
return o.BondMode, true
}
// HasBondMode returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasBondMode() bool {
if o != nil && !IsNil(o.BondMode) {
return true
}
return false
}
// SetBondMode gets a reference to the given NetworkInterfaceBondMode and assigns it to the BondMode field.
func (o *CreateNetworkInterfaceRequestContent) SetBondMode(v NetworkInterfaceBondMode) {
o.BondMode = &v
}
// GetBondXmitHashPolicy returns the BondXmitHashPolicy field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetBondXmitHashPolicy() NetworkInterfaceBondHashPolicy {
if o == nil || IsNil(o.BondXmitHashPolicy) {
var ret NetworkInterfaceBondHashPolicy
return ret
}
return *o.BondXmitHashPolicy
}
// GetBondXmitHashPolicyOk returns a tuple with the BondXmitHashPolicy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetBondXmitHashPolicyOk() (*NetworkInterfaceBondHashPolicy, bool) {
if o == nil || IsNil(o.BondXmitHashPolicy) {
return nil, false
}
return o.BondXmitHashPolicy, true
}
// HasBondXmitHashPolicy returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasBondXmitHashPolicy() bool {
if o != nil && !IsNil(o.BondXmitHashPolicy) {
return true
}
return false
}
// SetBondXmitHashPolicy gets a reference to the given NetworkInterfaceBondHashPolicy and assigns it to the BondXmitHashPolicy field.
func (o *CreateNetworkInterfaceRequestContent) SetBondXmitHashPolicy(v NetworkInterfaceBondHashPolicy) {
o.BondXmitHashPolicy = &v
}
// GetBridgePorts returns the BridgePorts field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetBridgePorts() string {
if o == nil || IsNil(o.BridgePorts) {
var ret string
return ret
}
return *o.BridgePorts
}
// GetBridgePortsOk returns a tuple with the BridgePorts field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetBridgePortsOk() (*string, bool) {
if o == nil || IsNil(o.BridgePorts) {
return nil, false
}
return o.BridgePorts, true
}
// HasBridgePorts returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasBridgePorts() bool {
if o != nil && !IsNil(o.BridgePorts) {
return true
}
return false
}
// SetBridgePorts gets a reference to the given string and assigns it to the BridgePorts field.
func (o *CreateNetworkInterfaceRequestContent) SetBridgePorts(v string) {
o.BridgePorts = &v
}
// GetBridgeVlanAware returns the BridgeVlanAware field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetBridgeVlanAware() bool {
if o == nil || IsNil(o.BridgeVlanAware) {
var ret bool
return ret
}
return *o.BridgeVlanAware
}
// GetBridgeVlanAwareOk returns a tuple with the BridgeVlanAware field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetBridgeVlanAwareOk() (*bool, bool) {
if o == nil || IsNil(o.BridgeVlanAware) {
return nil, false
}
return o.BridgeVlanAware, true
}
// HasBridgeVlanAware returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasBridgeVlanAware() bool {
if o != nil && !IsNil(o.BridgeVlanAware) {
return true
}
return false
}
// SetBridgeVlanAware gets a reference to the given bool and assigns it to the BridgeVlanAware field.
func (o *CreateNetworkInterfaceRequestContent) SetBridgeVlanAware(v bool) {
o.BridgeVlanAware = &v
}
// GetCidr returns the Cidr field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetCidr() string {
if o == nil || IsNil(o.Cidr) {
var ret string
return ret
}
return *o.Cidr
}
// GetCidrOk returns a tuple with the Cidr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetCidrOk() (*string, bool) {
if o == nil || IsNil(o.Cidr) {
return nil, false
}
return o.Cidr, true
}
// HasCidr returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasCidr() bool {
if o != nil && !IsNil(o.Cidr) {
return true
}
return false
}
// SetCidr gets a reference to the given string and assigns it to the Cidr field.
func (o *CreateNetworkInterfaceRequestContent) SetCidr(v string) {
o.Cidr = &v
}
// GetCidr6 returns the Cidr6 field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetCidr6() string {
if o == nil || IsNil(o.Cidr6) {
var ret string
return ret
}
return *o.Cidr6
}
// GetCidr6Ok returns a tuple with the Cidr6 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetCidr6Ok() (*string, bool) {
if o == nil || IsNil(o.Cidr6) {
return nil, false
}
return o.Cidr6, true
}
// HasCidr6 returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasCidr6() bool {
if o != nil && !IsNil(o.Cidr6) {
return true
}
return false
}
// SetCidr6 gets a reference to the given string and assigns it to the Cidr6 field.
func (o *CreateNetworkInterfaceRequestContent) SetCidr6(v string) {
o.Cidr6 = &v
}
// GetComments returns the Comments field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetComments() string {
if o == nil || IsNil(o.Comments) {
var ret string
return ret
}
return *o.Comments
}
// GetCommentsOk returns a tuple with the Comments field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetCommentsOk() (*string, bool) {
if o == nil || IsNil(o.Comments) {
return nil, false
}
return o.Comments, true
}
// HasComments returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasComments() bool {
if o != nil && !IsNil(o.Comments) {
return true
}
return false
}
// SetComments gets a reference to the given string and assigns it to the Comments field.
func (o *CreateNetworkInterfaceRequestContent) SetComments(v string) {
o.Comments = &v
}
// GetComments6 returns the Comments6 field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetComments6() string {
if o == nil || IsNil(o.Comments6) {
var ret string
return ret
}
return *o.Comments6
}
// GetComments6Ok returns a tuple with the Comments6 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetComments6Ok() (*string, bool) {
if o == nil || IsNil(o.Comments6) {
return nil, false
}
return o.Comments6, true
}
// HasComments6 returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasComments6() bool {
if o != nil && !IsNil(o.Comments6) {
return true
}
return false
}
// SetComments6 gets a reference to the given string and assigns it to the Comments6 field.
func (o *CreateNetworkInterfaceRequestContent) SetComments6(v string) {
o.Comments6 = &v
}
// GetGateway returns the Gateway field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetGateway() string {
if o == nil || IsNil(o.Gateway) {
var ret string
return ret
}
return *o.Gateway
}
// GetGatewayOk returns a tuple with the Gateway field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetGatewayOk() (*string, bool) {
if o == nil || IsNil(o.Gateway) {
return nil, false
}
return o.Gateway, true
}
// HasGateway returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasGateway() bool {
if o != nil && !IsNil(o.Gateway) {
return true
}
return false
}
// SetGateway gets a reference to the given string and assigns it to the Gateway field.
func (o *CreateNetworkInterfaceRequestContent) SetGateway(v string) {
o.Gateway = &v
}
// GetGateway6 returns the Gateway6 field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetGateway6() string {
if o == nil || IsNil(o.Gateway6) {
var ret string
return ret
}
return *o.Gateway6
}
// GetGateway6Ok returns a tuple with the Gateway6 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetGateway6Ok() (*string, bool) {
if o == nil || IsNil(o.Gateway6) {
return nil, false
}
return o.Gateway6, true
}
// HasGateway6 returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasGateway6() bool {
if o != nil && !IsNil(o.Gateway6) {
return true
}
return false
}
// SetGateway6 gets a reference to the given string and assigns it to the Gateway6 field.
func (o *CreateNetworkInterfaceRequestContent) SetGateway6(v string) {
o.Gateway6 = &v
}
// GetMtu returns the Mtu field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetMtu() float32 {
if o == nil || IsNil(o.Mtu) {
var ret float32
return ret
}
return *o.Mtu
}
// GetMtuOk returns a tuple with the Mtu field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetMtuOk() (*float32, bool) {
if o == nil || IsNil(o.Mtu) {
return nil, false
}
return o.Mtu, true
}
// HasMtu returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasMtu() bool {
if o != nil && !IsNil(o.Mtu) {
return true
}
return false
}
// SetMtu gets a reference to the given float32 and assigns it to the Mtu field.
func (o *CreateNetworkInterfaceRequestContent) SetMtu(v float32) {
o.Mtu = &v
}
// GetNetmask returns the Netmask field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetNetmask() string {
if o == nil || IsNil(o.Netmask) {
var ret string
return ret
}
return *o.Netmask
}
// GetNetmaskOk returns a tuple with the Netmask field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetNetmaskOk() (*string, bool) {
if o == nil || IsNil(o.Netmask) {
return nil, false
}
return o.Netmask, true
}
// HasNetmask returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasNetmask() bool {
if o != nil && !IsNil(o.Netmask) {
return true
}
return false
}
// SetNetmask gets a reference to the given string and assigns it to the Netmask field.
func (o *CreateNetworkInterfaceRequestContent) SetNetmask(v string) {
o.Netmask = &v
}
// GetNetmask6 returns the Netmask6 field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetNetmask6() string {
if o == nil || IsNil(o.Netmask6) {
var ret string
return ret
}
return *o.Netmask6
}
// GetNetmask6Ok returns a tuple with the Netmask6 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetNetmask6Ok() (*string, bool) {
if o == nil || IsNil(o.Netmask6) {
return nil, false
}
return o.Netmask6, true
}
// HasNetmask6 returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasNetmask6() bool {
if o != nil && !IsNil(o.Netmask6) {
return true
}
return false
}
// SetNetmask6 gets a reference to the given string and assigns it to the Netmask6 field.
func (o *CreateNetworkInterfaceRequestContent) SetNetmask6(v string) {
o.Netmask6 = &v
}
// GetOvsBonds returns the OvsBonds field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetOvsBonds() string {
if o == nil || IsNil(o.OvsBonds) {
var ret string
return ret
}
return *o.OvsBonds
}
// GetOvsBondsOk returns a tuple with the OvsBonds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetOvsBondsOk() (*string, bool) {
if o == nil || IsNil(o.OvsBonds) {
return nil, false
}
return o.OvsBonds, true
}
// HasOvsBonds returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasOvsBonds() bool {
if o != nil && !IsNil(o.OvsBonds) {
return true
}
return false
}
// SetOvsBonds gets a reference to the given string and assigns it to the OvsBonds field.
func (o *CreateNetworkInterfaceRequestContent) SetOvsBonds(v string) {
o.OvsBonds = &v
}
// GetOvsOptions returns the OvsOptions field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetOvsOptions() string {
if o == nil || IsNil(o.OvsOptions) {
var ret string
return ret
}
return *o.OvsOptions
}
// GetOvsOptionsOk returns a tuple with the OvsOptions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetOvsOptionsOk() (*string, bool) {
if o == nil || IsNil(o.OvsOptions) {
return nil, false
}
return o.OvsOptions, true
}
// HasOvsOptions returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasOvsOptions() bool {
if o != nil && !IsNil(o.OvsOptions) {
return true
}
return false
}
// SetOvsOptions gets a reference to the given string and assigns it to the OvsOptions field.
func (o *CreateNetworkInterfaceRequestContent) SetOvsOptions(v string) {
o.OvsOptions = &v
}
// GetOvsPorts returns the OvsPorts field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetOvsPorts() string {
if o == nil || IsNil(o.OvsPorts) {
var ret string
return ret
}
return *o.OvsPorts
}
// GetOvsPortsOk returns a tuple with the OvsPorts field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetOvsPortsOk() (*string, bool) {
if o == nil || IsNil(o.OvsPorts) {
return nil, false
}
return o.OvsPorts, true
}
// HasOvsPorts returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasOvsPorts() bool {
if o != nil && !IsNil(o.OvsPorts) {
return true
}
return false
}
// SetOvsPorts gets a reference to the given string and assigns it to the OvsPorts field.
func (o *CreateNetworkInterfaceRequestContent) SetOvsPorts(v string) {
o.OvsPorts = &v
}
// GetOvsTag returns the OvsTag field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetOvsTag() float32 {
if o == nil || IsNil(o.OvsTag) {
var ret float32
return ret
}
return *o.OvsTag
}
// GetOvsTagOk returns a tuple with the OvsTag field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetOvsTagOk() (*float32, bool) {
if o == nil || IsNil(o.OvsTag) {
return nil, false
}
return o.OvsTag, true
}
// HasOvsTag returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasOvsTag() bool {
if o != nil && !IsNil(o.OvsTag) {
return true
}
return false
}
// SetOvsTag gets a reference to the given float32 and assigns it to the OvsTag field.
func (o *CreateNetworkInterfaceRequestContent) SetOvsTag(v float32) {
o.OvsTag = &v
}
// GetOvsBridge returns the OvsBridge field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetOvsBridge() string {
if o == nil || IsNil(o.OvsBridge) {
var ret string
return ret
}
return *o.OvsBridge
}
// GetOvsBridgeOk returns a tuple with the OvsBridge field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetOvsBridgeOk() (*string, bool) {
if o == nil || IsNil(o.OvsBridge) {
return nil, false
}
return o.OvsBridge, true
}
// HasOvsBridge returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasOvsBridge() bool {
if o != nil && !IsNil(o.OvsBridge) {
return true
}
return false
}
// SetOvsBridge gets a reference to the given string and assigns it to the OvsBridge field.
func (o *CreateNetworkInterfaceRequestContent) SetOvsBridge(v string) {
o.OvsBridge = &v
}
// GetSlaves returns the Slaves field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetSlaves() string {
if o == nil || IsNil(o.Slaves) {
var ret string
return ret
}
return *o.Slaves
}
// GetSlavesOk returns a tuple with the Slaves field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetSlavesOk() (*string, bool) {
if o == nil || IsNil(o.Slaves) {
return nil, false
}
return o.Slaves, true
}
// HasSlaves returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasSlaves() bool {
if o != nil && !IsNil(o.Slaves) {
return true
}
return false
}
// SetSlaves gets a reference to the given string and assigns it to the Slaves field.
func (o *CreateNetworkInterfaceRequestContent) SetSlaves(v string) {
o.Slaves = &v
}
// GetVlanId returns the VlanId field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetVlanId() float32 {
if o == nil || IsNil(o.VlanId) {
var ret float32
return ret
}
return *o.VlanId
}
// GetVlanIdOk returns a tuple with the VlanId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetVlanIdOk() (*float32, bool) {
if o == nil || IsNil(o.VlanId) {
return nil, false
}
return o.VlanId, true
}
// HasVlanId returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasVlanId() bool {
if o != nil && !IsNil(o.VlanId) {
return true
}
return false
}
// SetVlanId gets a reference to the given float32 and assigns it to the VlanId field.
func (o *CreateNetworkInterfaceRequestContent) SetVlanId(v float32) {
o.VlanId = &v
}
// GetVlanRawDevice returns the VlanRawDevice field value if set, zero value otherwise.
func (o *CreateNetworkInterfaceRequestContent) GetVlanRawDevice() string {
if o == nil || IsNil(o.VlanRawDevice) {
var ret string
return ret
}
return *o.VlanRawDevice
}
// GetVlanRawDeviceOk returns a tuple with the VlanRawDevice field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNetworkInterfaceRequestContent) GetVlanRawDeviceOk() (*string, bool) {
if o == nil || IsNil(o.VlanRawDevice) {
return nil, false
}
return o.VlanRawDevice, true
}
// HasVlanRawDevice returns a boolean if a field has been set.
func (o *CreateNetworkInterfaceRequestContent) HasVlanRawDevice() bool {
if o != nil && !IsNil(o.VlanRawDevice) {
return true
}
return false
}
// SetVlanRawDevice gets a reference to the given string and assigns it to the VlanRawDevice field.
func (o *CreateNetworkInterfaceRequestContent) SetVlanRawDevice(v string) {
o.VlanRawDevice = &v
}
func (o CreateNetworkInterfaceRequestContent) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CreateNetworkInterfaceRequestContent) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["iface"] = o.Iface
toSerialize["type"] = o.Type
if !IsNil(o.Address) {
toSerialize["address"] = o.Address
}
if !IsNil(o.Address6) {
toSerialize["address6"] = o.Address6
}
if !IsNil(o.Autostart) {
toSerialize["autostart"] = o.Autostart
}
if !IsNil(o.BondPrimary) {
toSerialize["bond_primary"] = o.BondPrimary
}
if !IsNil(o.BondMode) {
toSerialize["bond_mode"] = o.BondMode
}
if !IsNil(o.BondXmitHashPolicy) {
toSerialize["bond_xmit_hash_policy"] = o.BondXmitHashPolicy
}
if !IsNil(o.BridgePorts) {
toSerialize["bridge_ports"] = o.BridgePorts
}
if !IsNil(o.BridgeVlanAware) {
toSerialize["bridge_vlan_aware"] = o.BridgeVlanAware
}
if !IsNil(o.Cidr) {
toSerialize["cidr"] = o.Cidr
}
if !IsNil(o.Cidr6) {
toSerialize["cidr6"] = o.Cidr6
}
if !IsNil(o.Comments) {
toSerialize["comments"] = o.Comments
}
if !IsNil(o.Comments6) {
toSerialize["comments6"] = o.Comments6
}
if !IsNil(o.Gateway) {
toSerialize["gateway"] = o.Gateway
}
if !IsNil(o.Gateway6) {
toSerialize["gateway6"] = o.Gateway6
}
if !IsNil(o.Mtu) {
toSerialize["mtu"] = o.Mtu
}
if !IsNil(o.Netmask) {
toSerialize["netmask"] = o.Netmask
}
if !IsNil(o.Netmask6) {
toSerialize["netmask6"] = o.Netmask6
}
if !IsNil(o.OvsBonds) {
toSerialize["ovs_bonds"] = o.OvsBonds
}
if !IsNil(o.OvsOptions) {
toSerialize["ovs_options"] = o.OvsOptions
}
if !IsNil(o.OvsPorts) {
toSerialize["ovs_ports"] = o.OvsPorts
}
if !IsNil(o.OvsTag) {
toSerialize["ovs_tag"] = o.OvsTag
}
if !IsNil(o.OvsBridge) {
toSerialize["ovs_bridge"] = o.OvsBridge
}
if !IsNil(o.Slaves) {
toSerialize["slaves"] = o.Slaves
}
if !IsNil(o.VlanId) {
toSerialize["vlan-id"] = o.VlanId