forked from enix/dothill-api-go
/
model_port_resource_inner.go
995 lines (851 loc) · 27.7 KB
/
model_port_resource_inner.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
/*
Seagate Management Controller (MC) OpenAPI
This API allows users to interact through the MC API to provision and manage storage.
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package client
import (
"encoding/json"
)
// checks if the PortResourceInner type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PortResourceInner{}
// PortResourceInner struct for PortResourceInner
type PortResourceInner struct {
ObjectName *string `json:"object-name,omitempty"`
Meta *string `json:"meta,omitempty"`
// Actual speed for this port
ActualSpeed *string `json:"actual-speed,omitempty"`
// Actual speed for this port( In numeric form )
ActualSpeedNumeric *int64 `json:"actual-speed-numeric,omitempty"`
ConfiguredSpeed *string `json:"configured-speed,omitempty"`
ConfiguredSpeedNumeric *int64 `json:"configured-speed-numeric,omitempty"`
Controller *string `json:"controller,omitempty"`
ControllerNumeric *int64 `json:"controller-numeric,omitempty"`
DurableId *string `json:"durable-id,omitempty"`
FanOut *int64 `json:"fan-out,omitempty"`
Health *string `json:"health,omitempty"`
HealthNumeric *int64 `json:"health-numeric,omitempty"`
HealthReason *string `json:"health-reason,omitempty"`
HealthRecommendation *string `json:"health-recommendation,omitempty"`
// Type of connection media used for this port
Media *string `json:"media,omitempty"`
Port *string `json:"port,omitempty"`
// Port Type (FC, iSCSI, SAS)
PortType *string `json:"port-type,omitempty"`
// Port Type (FC, iSCSI, SAS)( In numeric form )
PortTypeNumeric *int64 `json:"port-type-numeric,omitempty"`
Status *string `json:"status,omitempty"`
StatusNumeric *int64 `json:"status-numeric,omitempty"`
// WWPN or IQN of the host port
TargetId *string `json:"target-id,omitempty"`
// The resource URL
Url *string `json:"url,omitempty"`
FcPort []FcPortResourceInner `json:"fc-port,omitempty"`
IscsiPort []IscsiPortResourceInner `json:"iscsi-port,omitempty"`
SasPort []SasPortResourceInner `json:"sas-port,omitempty"`
}
// NewPortResourceInner instantiates a new PortResourceInner 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 NewPortResourceInner() *PortResourceInner {
this := PortResourceInner{}
return &this
}
// NewPortResourceInnerWithDefaults instantiates a new PortResourceInner 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 NewPortResourceInnerWithDefaults() *PortResourceInner {
this := PortResourceInner{}
return &this
}
// GetObjectName returns the ObjectName field value if set, zero value otherwise.
func (o *PortResourceInner) GetObjectName() string {
if o == nil || IsNil(o.ObjectName) {
var ret string
return ret
}
return *o.ObjectName
}
// GetObjectNameOk returns a tuple with the ObjectName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetObjectNameOk() (*string, bool) {
if o == nil || IsNil(o.ObjectName) {
return nil, false
}
return o.ObjectName, true
}
// HasObjectName returns a boolean if a field has been set.
func (o *PortResourceInner) HasObjectName() bool {
if o != nil && !IsNil(o.ObjectName) {
return true
}
return false
}
// SetObjectName gets a reference to the given string and assigns it to the ObjectName field.
func (o *PortResourceInner) SetObjectName(v string) {
o.ObjectName = &v
}
// GetMeta returns the Meta field value if set, zero value otherwise.
func (o *PortResourceInner) GetMeta() string {
if o == nil || IsNil(o.Meta) {
var ret string
return ret
}
return *o.Meta
}
// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetMetaOk() (*string, bool) {
if o == nil || IsNil(o.Meta) {
return nil, false
}
return o.Meta, true
}
// HasMeta returns a boolean if a field has been set.
func (o *PortResourceInner) HasMeta() bool {
if o != nil && !IsNil(o.Meta) {
return true
}
return false
}
// SetMeta gets a reference to the given string and assigns it to the Meta field.
func (o *PortResourceInner) SetMeta(v string) {
o.Meta = &v
}
// GetActualSpeed returns the ActualSpeed field value if set, zero value otherwise.
func (o *PortResourceInner) GetActualSpeed() string {
if o == nil || IsNil(o.ActualSpeed) {
var ret string
return ret
}
return *o.ActualSpeed
}
// GetActualSpeedOk returns a tuple with the ActualSpeed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetActualSpeedOk() (*string, bool) {
if o == nil || IsNil(o.ActualSpeed) {
return nil, false
}
return o.ActualSpeed, true
}
// HasActualSpeed returns a boolean if a field has been set.
func (o *PortResourceInner) HasActualSpeed() bool {
if o != nil && !IsNil(o.ActualSpeed) {
return true
}
return false
}
// SetActualSpeed gets a reference to the given string and assigns it to the ActualSpeed field.
func (o *PortResourceInner) SetActualSpeed(v string) {
o.ActualSpeed = &v
}
// GetActualSpeedNumeric returns the ActualSpeedNumeric field value if set, zero value otherwise.
func (o *PortResourceInner) GetActualSpeedNumeric() int64 {
if o == nil || IsNil(o.ActualSpeedNumeric) {
var ret int64
return ret
}
return *o.ActualSpeedNumeric
}
// GetActualSpeedNumericOk returns a tuple with the ActualSpeedNumeric field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetActualSpeedNumericOk() (*int64, bool) {
if o == nil || IsNil(o.ActualSpeedNumeric) {
return nil, false
}
return o.ActualSpeedNumeric, true
}
// HasActualSpeedNumeric returns a boolean if a field has been set.
func (o *PortResourceInner) HasActualSpeedNumeric() bool {
if o != nil && !IsNil(o.ActualSpeedNumeric) {
return true
}
return false
}
// SetActualSpeedNumeric gets a reference to the given int64 and assigns it to the ActualSpeedNumeric field.
func (o *PortResourceInner) SetActualSpeedNumeric(v int64) {
o.ActualSpeedNumeric = &v
}
// GetConfiguredSpeed returns the ConfiguredSpeed field value if set, zero value otherwise.
func (o *PortResourceInner) GetConfiguredSpeed() string {
if o == nil || IsNil(o.ConfiguredSpeed) {
var ret string
return ret
}
return *o.ConfiguredSpeed
}
// GetConfiguredSpeedOk returns a tuple with the ConfiguredSpeed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetConfiguredSpeedOk() (*string, bool) {
if o == nil || IsNil(o.ConfiguredSpeed) {
return nil, false
}
return o.ConfiguredSpeed, true
}
// HasConfiguredSpeed returns a boolean if a field has been set.
func (o *PortResourceInner) HasConfiguredSpeed() bool {
if o != nil && !IsNil(o.ConfiguredSpeed) {
return true
}
return false
}
// SetConfiguredSpeed gets a reference to the given string and assigns it to the ConfiguredSpeed field.
func (o *PortResourceInner) SetConfiguredSpeed(v string) {
o.ConfiguredSpeed = &v
}
// GetConfiguredSpeedNumeric returns the ConfiguredSpeedNumeric field value if set, zero value otherwise.
func (o *PortResourceInner) GetConfiguredSpeedNumeric() int64 {
if o == nil || IsNil(o.ConfiguredSpeedNumeric) {
var ret int64
return ret
}
return *o.ConfiguredSpeedNumeric
}
// GetConfiguredSpeedNumericOk returns a tuple with the ConfiguredSpeedNumeric field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetConfiguredSpeedNumericOk() (*int64, bool) {
if o == nil || IsNil(o.ConfiguredSpeedNumeric) {
return nil, false
}
return o.ConfiguredSpeedNumeric, true
}
// HasConfiguredSpeedNumeric returns a boolean if a field has been set.
func (o *PortResourceInner) HasConfiguredSpeedNumeric() bool {
if o != nil && !IsNil(o.ConfiguredSpeedNumeric) {
return true
}
return false
}
// SetConfiguredSpeedNumeric gets a reference to the given int64 and assigns it to the ConfiguredSpeedNumeric field.
func (o *PortResourceInner) SetConfiguredSpeedNumeric(v int64) {
o.ConfiguredSpeedNumeric = &v
}
// GetController returns the Controller field value if set, zero value otherwise.
func (o *PortResourceInner) GetController() string {
if o == nil || IsNil(o.Controller) {
var ret string
return ret
}
return *o.Controller
}
// GetControllerOk returns a tuple with the Controller field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetControllerOk() (*string, bool) {
if o == nil || IsNil(o.Controller) {
return nil, false
}
return o.Controller, true
}
// HasController returns a boolean if a field has been set.
func (o *PortResourceInner) HasController() bool {
if o != nil && !IsNil(o.Controller) {
return true
}
return false
}
// SetController gets a reference to the given string and assigns it to the Controller field.
func (o *PortResourceInner) SetController(v string) {
o.Controller = &v
}
// GetControllerNumeric returns the ControllerNumeric field value if set, zero value otherwise.
func (o *PortResourceInner) GetControllerNumeric() int64 {
if o == nil || IsNil(o.ControllerNumeric) {
var ret int64
return ret
}
return *o.ControllerNumeric
}
// GetControllerNumericOk returns a tuple with the ControllerNumeric field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetControllerNumericOk() (*int64, bool) {
if o == nil || IsNil(o.ControllerNumeric) {
return nil, false
}
return o.ControllerNumeric, true
}
// HasControllerNumeric returns a boolean if a field has been set.
func (o *PortResourceInner) HasControllerNumeric() bool {
if o != nil && !IsNil(o.ControllerNumeric) {
return true
}
return false
}
// SetControllerNumeric gets a reference to the given int64 and assigns it to the ControllerNumeric field.
func (o *PortResourceInner) SetControllerNumeric(v int64) {
o.ControllerNumeric = &v
}
// GetDurableId returns the DurableId field value if set, zero value otherwise.
func (o *PortResourceInner) GetDurableId() string {
if o == nil || IsNil(o.DurableId) {
var ret string
return ret
}
return *o.DurableId
}
// GetDurableIdOk returns a tuple with the DurableId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetDurableIdOk() (*string, bool) {
if o == nil || IsNil(o.DurableId) {
return nil, false
}
return o.DurableId, true
}
// HasDurableId returns a boolean if a field has been set.
func (o *PortResourceInner) HasDurableId() bool {
if o != nil && !IsNil(o.DurableId) {
return true
}
return false
}
// SetDurableId gets a reference to the given string and assigns it to the DurableId field.
func (o *PortResourceInner) SetDurableId(v string) {
o.DurableId = &v
}
// GetFanOut returns the FanOut field value if set, zero value otherwise.
func (o *PortResourceInner) GetFanOut() int64 {
if o == nil || IsNil(o.FanOut) {
var ret int64
return ret
}
return *o.FanOut
}
// GetFanOutOk returns a tuple with the FanOut field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetFanOutOk() (*int64, bool) {
if o == nil || IsNil(o.FanOut) {
return nil, false
}
return o.FanOut, true
}
// HasFanOut returns a boolean if a field has been set.
func (o *PortResourceInner) HasFanOut() bool {
if o != nil && !IsNil(o.FanOut) {
return true
}
return false
}
// SetFanOut gets a reference to the given int64 and assigns it to the FanOut field.
func (o *PortResourceInner) SetFanOut(v int64) {
o.FanOut = &v
}
// GetHealth returns the Health field value if set, zero value otherwise.
func (o *PortResourceInner) GetHealth() string {
if o == nil || IsNil(o.Health) {
var ret string
return ret
}
return *o.Health
}
// GetHealthOk returns a tuple with the Health field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetHealthOk() (*string, bool) {
if o == nil || IsNil(o.Health) {
return nil, false
}
return o.Health, true
}
// HasHealth returns a boolean if a field has been set.
func (o *PortResourceInner) HasHealth() bool {
if o != nil && !IsNil(o.Health) {
return true
}
return false
}
// SetHealth gets a reference to the given string and assigns it to the Health field.
func (o *PortResourceInner) SetHealth(v string) {
o.Health = &v
}
// GetHealthNumeric returns the HealthNumeric field value if set, zero value otherwise.
func (o *PortResourceInner) GetHealthNumeric() int64 {
if o == nil || IsNil(o.HealthNumeric) {
var ret int64
return ret
}
return *o.HealthNumeric
}
// GetHealthNumericOk returns a tuple with the HealthNumeric field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetHealthNumericOk() (*int64, bool) {
if o == nil || IsNil(o.HealthNumeric) {
return nil, false
}
return o.HealthNumeric, true
}
// HasHealthNumeric returns a boolean if a field has been set.
func (o *PortResourceInner) HasHealthNumeric() bool {
if o != nil && !IsNil(o.HealthNumeric) {
return true
}
return false
}
// SetHealthNumeric gets a reference to the given int64 and assigns it to the HealthNumeric field.
func (o *PortResourceInner) SetHealthNumeric(v int64) {
o.HealthNumeric = &v
}
// GetHealthReason returns the HealthReason field value if set, zero value otherwise.
func (o *PortResourceInner) GetHealthReason() string {
if o == nil || IsNil(o.HealthReason) {
var ret string
return ret
}
return *o.HealthReason
}
// GetHealthReasonOk returns a tuple with the HealthReason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetHealthReasonOk() (*string, bool) {
if o == nil || IsNil(o.HealthReason) {
return nil, false
}
return o.HealthReason, true
}
// HasHealthReason returns a boolean if a field has been set.
func (o *PortResourceInner) HasHealthReason() bool {
if o != nil && !IsNil(o.HealthReason) {
return true
}
return false
}
// SetHealthReason gets a reference to the given string and assigns it to the HealthReason field.
func (o *PortResourceInner) SetHealthReason(v string) {
o.HealthReason = &v
}
// GetHealthRecommendation returns the HealthRecommendation field value if set, zero value otherwise.
func (o *PortResourceInner) GetHealthRecommendation() string {
if o == nil || IsNil(o.HealthRecommendation) {
var ret string
return ret
}
return *o.HealthRecommendation
}
// GetHealthRecommendationOk returns a tuple with the HealthRecommendation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetHealthRecommendationOk() (*string, bool) {
if o == nil || IsNil(o.HealthRecommendation) {
return nil, false
}
return o.HealthRecommendation, true
}
// HasHealthRecommendation returns a boolean if a field has been set.
func (o *PortResourceInner) HasHealthRecommendation() bool {
if o != nil && !IsNil(o.HealthRecommendation) {
return true
}
return false
}
// SetHealthRecommendation gets a reference to the given string and assigns it to the HealthRecommendation field.
func (o *PortResourceInner) SetHealthRecommendation(v string) {
o.HealthRecommendation = &v
}
// GetMedia returns the Media field value if set, zero value otherwise.
func (o *PortResourceInner) GetMedia() string {
if o == nil || IsNil(o.Media) {
var ret string
return ret
}
return *o.Media
}
// GetMediaOk returns a tuple with the Media field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetMediaOk() (*string, bool) {
if o == nil || IsNil(o.Media) {
return nil, false
}
return o.Media, true
}
// HasMedia returns a boolean if a field has been set.
func (o *PortResourceInner) HasMedia() bool {
if o != nil && !IsNil(o.Media) {
return true
}
return false
}
// SetMedia gets a reference to the given string and assigns it to the Media field.
func (o *PortResourceInner) SetMedia(v string) {
o.Media = &v
}
// GetPort returns the Port field value if set, zero value otherwise.
func (o *PortResourceInner) GetPort() string {
if o == nil || IsNil(o.Port) {
var ret string
return ret
}
return *o.Port
}
// GetPortOk returns a tuple with the Port field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetPortOk() (*string, bool) {
if o == nil || IsNil(o.Port) {
return nil, false
}
return o.Port, true
}
// HasPort returns a boolean if a field has been set.
func (o *PortResourceInner) HasPort() bool {
if o != nil && !IsNil(o.Port) {
return true
}
return false
}
// SetPort gets a reference to the given string and assigns it to the Port field.
func (o *PortResourceInner) SetPort(v string) {
o.Port = &v
}
// GetPortType returns the PortType field value if set, zero value otherwise.
func (o *PortResourceInner) GetPortType() string {
if o == nil || IsNil(o.PortType) {
var ret string
return ret
}
return *o.PortType
}
// GetPortTypeOk returns a tuple with the PortType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetPortTypeOk() (*string, bool) {
if o == nil || IsNil(o.PortType) {
return nil, false
}
return o.PortType, true
}
// HasPortType returns a boolean if a field has been set.
func (o *PortResourceInner) HasPortType() bool {
if o != nil && !IsNil(o.PortType) {
return true
}
return false
}
// SetPortType gets a reference to the given string and assigns it to the PortType field.
func (o *PortResourceInner) SetPortType(v string) {
o.PortType = &v
}
// GetPortTypeNumeric returns the PortTypeNumeric field value if set, zero value otherwise.
func (o *PortResourceInner) GetPortTypeNumeric() int64 {
if o == nil || IsNil(o.PortTypeNumeric) {
var ret int64
return ret
}
return *o.PortTypeNumeric
}
// GetPortTypeNumericOk returns a tuple with the PortTypeNumeric field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetPortTypeNumericOk() (*int64, bool) {
if o == nil || IsNil(o.PortTypeNumeric) {
return nil, false
}
return o.PortTypeNumeric, true
}
// HasPortTypeNumeric returns a boolean if a field has been set.
func (o *PortResourceInner) HasPortTypeNumeric() bool {
if o != nil && !IsNil(o.PortTypeNumeric) {
return true
}
return false
}
// SetPortTypeNumeric gets a reference to the given int64 and assigns it to the PortTypeNumeric field.
func (o *PortResourceInner) SetPortTypeNumeric(v int64) {
o.PortTypeNumeric = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *PortResourceInner) GetStatus() string {
if o == nil || IsNil(o.Status) {
var ret string
return ret
}
return *o.Status
}
// 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 *PortResourceInner) GetStatusOk() (*string, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *PortResourceInner) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *PortResourceInner) SetStatus(v string) {
o.Status = &v
}
// GetStatusNumeric returns the StatusNumeric field value if set, zero value otherwise.
func (o *PortResourceInner) GetStatusNumeric() int64 {
if o == nil || IsNil(o.StatusNumeric) {
var ret int64
return ret
}
return *o.StatusNumeric
}
// GetStatusNumericOk returns a tuple with the StatusNumeric field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetStatusNumericOk() (*int64, bool) {
if o == nil || IsNil(o.StatusNumeric) {
return nil, false
}
return o.StatusNumeric, true
}
// HasStatusNumeric returns a boolean if a field has been set.
func (o *PortResourceInner) HasStatusNumeric() bool {
if o != nil && !IsNil(o.StatusNumeric) {
return true
}
return false
}
// SetStatusNumeric gets a reference to the given int64 and assigns it to the StatusNumeric field.
func (o *PortResourceInner) SetStatusNumeric(v int64) {
o.StatusNumeric = &v
}
// GetTargetId returns the TargetId field value if set, zero value otherwise.
func (o *PortResourceInner) GetTargetId() string {
if o == nil || IsNil(o.TargetId) {
var ret string
return ret
}
return *o.TargetId
}
// GetTargetIdOk returns a tuple with the TargetId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetTargetIdOk() (*string, bool) {
if o == nil || IsNil(o.TargetId) {
return nil, false
}
return o.TargetId, true
}
// HasTargetId returns a boolean if a field has been set.
func (o *PortResourceInner) HasTargetId() bool {
if o != nil && !IsNil(o.TargetId) {
return true
}
return false
}
// SetTargetId gets a reference to the given string and assigns it to the TargetId field.
func (o *PortResourceInner) SetTargetId(v string) {
o.TargetId = &v
}
// GetUrl returns the Url field value if set, zero value otherwise.
func (o *PortResourceInner) GetUrl() string {
if o == nil || IsNil(o.Url) {
var ret string
return ret
}
return *o.Url
}
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetUrlOk() (*string, bool) {
if o == nil || IsNil(o.Url) {
return nil, false
}
return o.Url, true
}
// HasUrl returns a boolean if a field has been set.
func (o *PortResourceInner) HasUrl() bool {
if o != nil && !IsNil(o.Url) {
return true
}
return false
}
// SetUrl gets a reference to the given string and assigns it to the Url field.
func (o *PortResourceInner) SetUrl(v string) {
o.Url = &v
}
// GetFcPort returns the FcPort field value if set, zero value otherwise.
func (o *PortResourceInner) GetFcPort() []FcPortResourceInner {
if o == nil || IsNil(o.FcPort) {
var ret []FcPortResourceInner
return ret
}
return o.FcPort
}
// GetFcPortOk returns a tuple with the FcPort field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetFcPortOk() ([]FcPortResourceInner, bool) {
if o == nil || IsNil(o.FcPort) {
return nil, false
}
return o.FcPort, true
}
// HasFcPort returns a boolean if a field has been set.
func (o *PortResourceInner) HasFcPort() bool {
if o != nil && !IsNil(o.FcPort) {
return true
}
return false
}
// SetFcPort gets a reference to the given []FcPortResourceInner and assigns it to the FcPort field.
func (o *PortResourceInner) SetFcPort(v []FcPortResourceInner) {
o.FcPort = v
}
// GetIscsiPort returns the IscsiPort field value if set, zero value otherwise.
func (o *PortResourceInner) GetIscsiPort() []IscsiPortResourceInner {
if o == nil || IsNil(o.IscsiPort) {
var ret []IscsiPortResourceInner
return ret
}
return o.IscsiPort
}
// GetIscsiPortOk returns a tuple with the IscsiPort field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetIscsiPortOk() ([]IscsiPortResourceInner, bool) {
if o == nil || IsNil(o.IscsiPort) {
return nil, false
}
return o.IscsiPort, true
}
// HasIscsiPort returns a boolean if a field has been set.
func (o *PortResourceInner) HasIscsiPort() bool {
if o != nil && !IsNil(o.IscsiPort) {
return true
}
return false
}
// SetIscsiPort gets a reference to the given []IscsiPortResourceInner and assigns it to the IscsiPort field.
func (o *PortResourceInner) SetIscsiPort(v []IscsiPortResourceInner) {
o.IscsiPort = v
}
// GetSasPort returns the SasPort field value if set, zero value otherwise.
func (o *PortResourceInner) GetSasPort() []SasPortResourceInner {
if o == nil || IsNil(o.SasPort) {
var ret []SasPortResourceInner
return ret
}
return o.SasPort
}
// GetSasPortOk returns a tuple with the SasPort field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PortResourceInner) GetSasPortOk() ([]SasPortResourceInner, bool) {
if o == nil || IsNil(o.SasPort) {
return nil, false
}
return o.SasPort, true
}
// HasSasPort returns a boolean if a field has been set.
func (o *PortResourceInner) HasSasPort() bool {
if o != nil && !IsNil(o.SasPort) {
return true
}
return false
}
// SetSasPort gets a reference to the given []SasPortResourceInner and assigns it to the SasPort field.
func (o *PortResourceInner) SetSasPort(v []SasPortResourceInner) {
o.SasPort = v
}
func (o PortResourceInner) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PortResourceInner) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ObjectName) {
toSerialize["object-name"] = o.ObjectName
}
if !IsNil(o.Meta) {
toSerialize["meta"] = o.Meta
}
if !IsNil(o.ActualSpeed) {
toSerialize["actual-speed"] = o.ActualSpeed
}
if !IsNil(o.ActualSpeedNumeric) {
toSerialize["actual-speed-numeric"] = o.ActualSpeedNumeric
}
if !IsNil(o.ConfiguredSpeed) {
toSerialize["configured-speed"] = o.ConfiguredSpeed
}
if !IsNil(o.ConfiguredSpeedNumeric) {
toSerialize["configured-speed-numeric"] = o.ConfiguredSpeedNumeric
}
if !IsNil(o.Controller) {
toSerialize["controller"] = o.Controller
}
if !IsNil(o.ControllerNumeric) {
toSerialize["controller-numeric"] = o.ControllerNumeric
}
if !IsNil(o.DurableId) {
toSerialize["durable-id"] = o.DurableId
}
if !IsNil(o.FanOut) {
toSerialize["fan-out"] = o.FanOut
}
if !IsNil(o.Health) {
toSerialize["health"] = o.Health
}
if !IsNil(o.HealthNumeric) {
toSerialize["health-numeric"] = o.HealthNumeric
}
if !IsNil(o.HealthReason) {
toSerialize["health-reason"] = o.HealthReason
}
if !IsNil(o.HealthRecommendation) {
toSerialize["health-recommendation"] = o.HealthRecommendation
}
if !IsNil(o.Media) {
toSerialize["media"] = o.Media
}
if !IsNil(o.Port) {
toSerialize["port"] = o.Port
}
if !IsNil(o.PortType) {
toSerialize["port-type"] = o.PortType
}
if !IsNil(o.PortTypeNumeric) {
toSerialize["port-type-numeric"] = o.PortTypeNumeric
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.StatusNumeric) {
toSerialize["status-numeric"] = o.StatusNumeric
}
if !IsNil(o.TargetId) {
toSerialize["target-id"] = o.TargetId
}
if !IsNil(o.Url) {
toSerialize["url"] = o.Url
}
if !IsNil(o.FcPort) {
toSerialize["fc-port"] = o.FcPort
}
if !IsNil(o.IscsiPort) {
toSerialize["iscsi-port"] = o.IscsiPort
}
if !IsNil(o.SasPort) {
toSerialize["sas-port"] = o.SasPort
}
return toSerialize, nil
}
type NullablePortResourceInner struct {
value *PortResourceInner
isSet bool
}
func (v NullablePortResourceInner) Get() *PortResourceInner {
return v.value
}
func (v *NullablePortResourceInner) Set(val *PortResourceInner) {
v.value = val
v.isSet = true
}
func (v NullablePortResourceInner) IsSet() bool {
return v.isSet
}
func (v *NullablePortResourceInner) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePortResourceInner(val *PortResourceInner) *NullablePortResourceInner {
return &NullablePortResourceInner{value: val, isSet: true}
}
func (v NullablePortResourceInner) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePortResourceInner) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}