-
Notifications
You must be signed in to change notification settings - Fork 4
/
model_service_profile_access_point_type_colo.go
684 lines (580 loc) · 23.9 KB
/
model_service_profile_access_point_type_colo.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
/*
Equinix Fabric API v4
Equinix Fabric is an advanced software-defined interconnection solution that enables you to directly, securely and dynamically connect to distributed infrastructure and digital ecosystems on platform Equinix via a single port, Customers can use Fabric to connect to: </br> 1. Cloud Service Providers - Clouds, network and other service providers. </br> 2. Enterprises - Other Equinix customers, vendors and partners. </br> 3. Myself - Another customer instance deployed at Equinix. </br>
Contact: api-support@equinix.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package fabricv4
import (
"bytes"
"encoding/json"
"fmt"
)
// checks if the ServiceProfileAccessPointTypeCOLO type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ServiceProfileAccessPointTypeCOLO{}
// ServiceProfileAccessPointTypeCOLO Colo Access Point Type
type ServiceProfileAccessPointTypeCOLO struct {
Uuid *string `json:"uuid,omitempty"`
Type ServiceProfileAccessPointTypeEnum `json:"type"`
SupportedBandwidths []int32 `json:"supportedBandwidths,omitempty"`
// Setting to allow or prohibit remote connections to the service profile.
AllowRemoteConnections *bool `json:"allowRemoteConnections,omitempty"`
// Setting to enable or disable the ability of the buyer to customize the bandwidth.
AllowCustomBandwidth *bool `json:"allowCustomBandwidth,omitempty"`
// percentage of port bandwidth at which an allocation alert is generated - missing on wiki.
BandwidthAlertThreshold *float32 `json:"bandwidthAlertThreshold,omitempty"`
// Setting to enable or disable the ability of the buyer to change connection bandwidth without approval of the seller.
AllowBandwidthAutoApproval *bool `json:"allowBandwidthAutoApproval,omitempty"`
// Availability of a bandwidth upgrade. The default is false.
AllowBandwidthUpgrade *bool `json:"allowBandwidthUpgrade,omitempty"`
LinkProtocolConfig *ServiceProfileLinkProtocolConfig `json:"linkProtocolConfig,omitempty"`
// for verizon only.
EnableAutoGenerateServiceKey *bool `json:"enableAutoGenerateServiceKey,omitempty"`
// Mandate redundant connections
ConnectionRedundancyRequired *bool `json:"connectionRedundancyRequired,omitempty"`
ApiConfig *ApiConfig `json:"apiConfig,omitempty"`
// custom name for \"Connection\"
ConnectionLabel *string `json:"connectionLabel,omitempty"`
AuthenticationKey *AuthenticationKey `json:"authenticationKey,omitempty"`
Metadata *ServiceProfileMetadata `json:"metadata,omitempty"`
}
type _ServiceProfileAccessPointTypeCOLO ServiceProfileAccessPointTypeCOLO
// NewServiceProfileAccessPointTypeCOLO instantiates a new ServiceProfileAccessPointTypeCOLO 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 NewServiceProfileAccessPointTypeCOLO(type_ ServiceProfileAccessPointTypeEnum) *ServiceProfileAccessPointTypeCOLO {
this := ServiceProfileAccessPointTypeCOLO{}
this.Type = type_
var allowRemoteConnections bool = false
this.AllowRemoteConnections = &allowRemoteConnections
var allowCustomBandwidth bool = false
this.AllowCustomBandwidth = &allowCustomBandwidth
var allowBandwidthAutoApproval bool = false
this.AllowBandwidthAutoApproval = &allowBandwidthAutoApproval
var connectionRedundancyRequired bool = false
this.ConnectionRedundancyRequired = &connectionRedundancyRequired
return &this
}
// NewServiceProfileAccessPointTypeCOLOWithDefaults instantiates a new ServiceProfileAccessPointTypeCOLO 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 NewServiceProfileAccessPointTypeCOLOWithDefaults() *ServiceProfileAccessPointTypeCOLO {
this := ServiceProfileAccessPointTypeCOLO{}
var allowRemoteConnections bool = false
this.AllowRemoteConnections = &allowRemoteConnections
var allowCustomBandwidth bool = false
this.AllowCustomBandwidth = &allowCustomBandwidth
var allowBandwidthAutoApproval bool = false
this.AllowBandwidthAutoApproval = &allowBandwidthAutoApproval
var connectionRedundancyRequired bool = false
this.ConnectionRedundancyRequired = &connectionRedundancyRequired
return &this
}
// GetUuid returns the Uuid field value if set, zero value otherwise.
func (o *ServiceProfileAccessPointTypeCOLO) GetUuid() string {
if o == nil || IsNil(o.Uuid) {
var ret string
return ret
}
return *o.Uuid
}
// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceProfileAccessPointTypeCOLO) GetUuidOk() (*string, bool) {
if o == nil || IsNil(o.Uuid) {
return nil, false
}
return o.Uuid, true
}
// HasUuid returns a boolean if a field has been set.
func (o *ServiceProfileAccessPointTypeCOLO) HasUuid() bool {
if o != nil && !IsNil(o.Uuid) {
return true
}
return false
}
// SetUuid gets a reference to the given string and assigns it to the Uuid field.
func (o *ServiceProfileAccessPointTypeCOLO) SetUuid(v string) {
o.Uuid = &v
}
// GetType returns the Type field value
func (o *ServiceProfileAccessPointTypeCOLO) GetType() ServiceProfileAccessPointTypeEnum {
if o == nil {
var ret ServiceProfileAccessPointTypeEnum
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 *ServiceProfileAccessPointTypeCOLO) GetTypeOk() (*ServiceProfileAccessPointTypeEnum, bool) {
if o == nil {
return nil, false
}
return &o.Type, true
}
// SetType sets field value
func (o *ServiceProfileAccessPointTypeCOLO) SetType(v ServiceProfileAccessPointTypeEnum) {
o.Type = v
}
// GetSupportedBandwidths returns the SupportedBandwidths field value if set, zero value otherwise.
func (o *ServiceProfileAccessPointTypeCOLO) GetSupportedBandwidths() []int32 {
if o == nil || IsNil(o.SupportedBandwidths) {
var ret []int32
return ret
}
return o.SupportedBandwidths
}
// GetSupportedBandwidthsOk returns a tuple with the SupportedBandwidths field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceProfileAccessPointTypeCOLO) GetSupportedBandwidthsOk() ([]int32, bool) {
if o == nil || IsNil(o.SupportedBandwidths) {
return nil, false
}
return o.SupportedBandwidths, true
}
// HasSupportedBandwidths returns a boolean if a field has been set.
func (o *ServiceProfileAccessPointTypeCOLO) HasSupportedBandwidths() bool {
if o != nil && !IsNil(o.SupportedBandwidths) {
return true
}
return false
}
// SetSupportedBandwidths gets a reference to the given []int32 and assigns it to the SupportedBandwidths field.
func (o *ServiceProfileAccessPointTypeCOLO) SetSupportedBandwidths(v []int32) {
o.SupportedBandwidths = v
}
// GetAllowRemoteConnections returns the AllowRemoteConnections field value if set, zero value otherwise.
func (o *ServiceProfileAccessPointTypeCOLO) GetAllowRemoteConnections() bool {
if o == nil || IsNil(o.AllowRemoteConnections) {
var ret bool
return ret
}
return *o.AllowRemoteConnections
}
// GetAllowRemoteConnectionsOk returns a tuple with the AllowRemoteConnections field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceProfileAccessPointTypeCOLO) GetAllowRemoteConnectionsOk() (*bool, bool) {
if o == nil || IsNil(o.AllowRemoteConnections) {
return nil, false
}
return o.AllowRemoteConnections, true
}
// HasAllowRemoteConnections returns a boolean if a field has been set.
func (o *ServiceProfileAccessPointTypeCOLO) HasAllowRemoteConnections() bool {
if o != nil && !IsNil(o.AllowRemoteConnections) {
return true
}
return false
}
// SetAllowRemoteConnections gets a reference to the given bool and assigns it to the AllowRemoteConnections field.
func (o *ServiceProfileAccessPointTypeCOLO) SetAllowRemoteConnections(v bool) {
o.AllowRemoteConnections = &v
}
// GetAllowCustomBandwidth returns the AllowCustomBandwidth field value if set, zero value otherwise.
func (o *ServiceProfileAccessPointTypeCOLO) GetAllowCustomBandwidth() bool {
if o == nil || IsNil(o.AllowCustomBandwidth) {
var ret bool
return ret
}
return *o.AllowCustomBandwidth
}
// GetAllowCustomBandwidthOk returns a tuple with the AllowCustomBandwidth field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceProfileAccessPointTypeCOLO) GetAllowCustomBandwidthOk() (*bool, bool) {
if o == nil || IsNil(o.AllowCustomBandwidth) {
return nil, false
}
return o.AllowCustomBandwidth, true
}
// HasAllowCustomBandwidth returns a boolean if a field has been set.
func (o *ServiceProfileAccessPointTypeCOLO) HasAllowCustomBandwidth() bool {
if o != nil && !IsNil(o.AllowCustomBandwidth) {
return true
}
return false
}
// SetAllowCustomBandwidth gets a reference to the given bool and assigns it to the AllowCustomBandwidth field.
func (o *ServiceProfileAccessPointTypeCOLO) SetAllowCustomBandwidth(v bool) {
o.AllowCustomBandwidth = &v
}
// GetBandwidthAlertThreshold returns the BandwidthAlertThreshold field value if set, zero value otherwise.
func (o *ServiceProfileAccessPointTypeCOLO) GetBandwidthAlertThreshold() float32 {
if o == nil || IsNil(o.BandwidthAlertThreshold) {
var ret float32
return ret
}
return *o.BandwidthAlertThreshold
}
// GetBandwidthAlertThresholdOk returns a tuple with the BandwidthAlertThreshold field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceProfileAccessPointTypeCOLO) GetBandwidthAlertThresholdOk() (*float32, bool) {
if o == nil || IsNil(o.BandwidthAlertThreshold) {
return nil, false
}
return o.BandwidthAlertThreshold, true
}
// HasBandwidthAlertThreshold returns a boolean if a field has been set.
func (o *ServiceProfileAccessPointTypeCOLO) HasBandwidthAlertThreshold() bool {
if o != nil && !IsNil(o.BandwidthAlertThreshold) {
return true
}
return false
}
// SetBandwidthAlertThreshold gets a reference to the given float32 and assigns it to the BandwidthAlertThreshold field.
func (o *ServiceProfileAccessPointTypeCOLO) SetBandwidthAlertThreshold(v float32) {
o.BandwidthAlertThreshold = &v
}
// GetAllowBandwidthAutoApproval returns the AllowBandwidthAutoApproval field value if set, zero value otherwise.
func (o *ServiceProfileAccessPointTypeCOLO) GetAllowBandwidthAutoApproval() bool {
if o == nil || IsNil(o.AllowBandwidthAutoApproval) {
var ret bool
return ret
}
return *o.AllowBandwidthAutoApproval
}
// GetAllowBandwidthAutoApprovalOk returns a tuple with the AllowBandwidthAutoApproval field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceProfileAccessPointTypeCOLO) GetAllowBandwidthAutoApprovalOk() (*bool, bool) {
if o == nil || IsNil(o.AllowBandwidthAutoApproval) {
return nil, false
}
return o.AllowBandwidthAutoApproval, true
}
// HasAllowBandwidthAutoApproval returns a boolean if a field has been set.
func (o *ServiceProfileAccessPointTypeCOLO) HasAllowBandwidthAutoApproval() bool {
if o != nil && !IsNil(o.AllowBandwidthAutoApproval) {
return true
}
return false
}
// SetAllowBandwidthAutoApproval gets a reference to the given bool and assigns it to the AllowBandwidthAutoApproval field.
func (o *ServiceProfileAccessPointTypeCOLO) SetAllowBandwidthAutoApproval(v bool) {
o.AllowBandwidthAutoApproval = &v
}
// GetAllowBandwidthUpgrade returns the AllowBandwidthUpgrade field value if set, zero value otherwise.
func (o *ServiceProfileAccessPointTypeCOLO) GetAllowBandwidthUpgrade() bool {
if o == nil || IsNil(o.AllowBandwidthUpgrade) {
var ret bool
return ret
}
return *o.AllowBandwidthUpgrade
}
// GetAllowBandwidthUpgradeOk returns a tuple with the AllowBandwidthUpgrade field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceProfileAccessPointTypeCOLO) GetAllowBandwidthUpgradeOk() (*bool, bool) {
if o == nil || IsNil(o.AllowBandwidthUpgrade) {
return nil, false
}
return o.AllowBandwidthUpgrade, true
}
// HasAllowBandwidthUpgrade returns a boolean if a field has been set.
func (o *ServiceProfileAccessPointTypeCOLO) HasAllowBandwidthUpgrade() bool {
if o != nil && !IsNil(o.AllowBandwidthUpgrade) {
return true
}
return false
}
// SetAllowBandwidthUpgrade gets a reference to the given bool and assigns it to the AllowBandwidthUpgrade field.
func (o *ServiceProfileAccessPointTypeCOLO) SetAllowBandwidthUpgrade(v bool) {
o.AllowBandwidthUpgrade = &v
}
// GetLinkProtocolConfig returns the LinkProtocolConfig field value if set, zero value otherwise.
func (o *ServiceProfileAccessPointTypeCOLO) GetLinkProtocolConfig() ServiceProfileLinkProtocolConfig {
if o == nil || IsNil(o.LinkProtocolConfig) {
var ret ServiceProfileLinkProtocolConfig
return ret
}
return *o.LinkProtocolConfig
}
// GetLinkProtocolConfigOk returns a tuple with the LinkProtocolConfig field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceProfileAccessPointTypeCOLO) GetLinkProtocolConfigOk() (*ServiceProfileLinkProtocolConfig, bool) {
if o == nil || IsNil(o.LinkProtocolConfig) {
return nil, false
}
return o.LinkProtocolConfig, true
}
// HasLinkProtocolConfig returns a boolean if a field has been set.
func (o *ServiceProfileAccessPointTypeCOLO) HasLinkProtocolConfig() bool {
if o != nil && !IsNil(o.LinkProtocolConfig) {
return true
}
return false
}
// SetLinkProtocolConfig gets a reference to the given ServiceProfileLinkProtocolConfig and assigns it to the LinkProtocolConfig field.
func (o *ServiceProfileAccessPointTypeCOLO) SetLinkProtocolConfig(v ServiceProfileLinkProtocolConfig) {
o.LinkProtocolConfig = &v
}
// GetEnableAutoGenerateServiceKey returns the EnableAutoGenerateServiceKey field value if set, zero value otherwise.
func (o *ServiceProfileAccessPointTypeCOLO) GetEnableAutoGenerateServiceKey() bool {
if o == nil || IsNil(o.EnableAutoGenerateServiceKey) {
var ret bool
return ret
}
return *o.EnableAutoGenerateServiceKey
}
// GetEnableAutoGenerateServiceKeyOk returns a tuple with the EnableAutoGenerateServiceKey field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceProfileAccessPointTypeCOLO) GetEnableAutoGenerateServiceKeyOk() (*bool, bool) {
if o == nil || IsNil(o.EnableAutoGenerateServiceKey) {
return nil, false
}
return o.EnableAutoGenerateServiceKey, true
}
// HasEnableAutoGenerateServiceKey returns a boolean if a field has been set.
func (o *ServiceProfileAccessPointTypeCOLO) HasEnableAutoGenerateServiceKey() bool {
if o != nil && !IsNil(o.EnableAutoGenerateServiceKey) {
return true
}
return false
}
// SetEnableAutoGenerateServiceKey gets a reference to the given bool and assigns it to the EnableAutoGenerateServiceKey field.
func (o *ServiceProfileAccessPointTypeCOLO) SetEnableAutoGenerateServiceKey(v bool) {
o.EnableAutoGenerateServiceKey = &v
}
// GetConnectionRedundancyRequired returns the ConnectionRedundancyRequired field value if set, zero value otherwise.
func (o *ServiceProfileAccessPointTypeCOLO) GetConnectionRedundancyRequired() bool {
if o == nil || IsNil(o.ConnectionRedundancyRequired) {
var ret bool
return ret
}
return *o.ConnectionRedundancyRequired
}
// GetConnectionRedundancyRequiredOk returns a tuple with the ConnectionRedundancyRequired field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceProfileAccessPointTypeCOLO) GetConnectionRedundancyRequiredOk() (*bool, bool) {
if o == nil || IsNil(o.ConnectionRedundancyRequired) {
return nil, false
}
return o.ConnectionRedundancyRequired, true
}
// HasConnectionRedundancyRequired returns a boolean if a field has been set.
func (o *ServiceProfileAccessPointTypeCOLO) HasConnectionRedundancyRequired() bool {
if o != nil && !IsNil(o.ConnectionRedundancyRequired) {
return true
}
return false
}
// SetConnectionRedundancyRequired gets a reference to the given bool and assigns it to the ConnectionRedundancyRequired field.
func (o *ServiceProfileAccessPointTypeCOLO) SetConnectionRedundancyRequired(v bool) {
o.ConnectionRedundancyRequired = &v
}
// GetApiConfig returns the ApiConfig field value if set, zero value otherwise.
func (o *ServiceProfileAccessPointTypeCOLO) GetApiConfig() ApiConfig {
if o == nil || IsNil(o.ApiConfig) {
var ret ApiConfig
return ret
}
return *o.ApiConfig
}
// GetApiConfigOk returns a tuple with the ApiConfig field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceProfileAccessPointTypeCOLO) GetApiConfigOk() (*ApiConfig, bool) {
if o == nil || IsNil(o.ApiConfig) {
return nil, false
}
return o.ApiConfig, true
}
// HasApiConfig returns a boolean if a field has been set.
func (o *ServiceProfileAccessPointTypeCOLO) HasApiConfig() bool {
if o != nil && !IsNil(o.ApiConfig) {
return true
}
return false
}
// SetApiConfig gets a reference to the given ApiConfig and assigns it to the ApiConfig field.
func (o *ServiceProfileAccessPointTypeCOLO) SetApiConfig(v ApiConfig) {
o.ApiConfig = &v
}
// GetConnectionLabel returns the ConnectionLabel field value if set, zero value otherwise.
func (o *ServiceProfileAccessPointTypeCOLO) GetConnectionLabel() string {
if o == nil || IsNil(o.ConnectionLabel) {
var ret string
return ret
}
return *o.ConnectionLabel
}
// GetConnectionLabelOk returns a tuple with the ConnectionLabel field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceProfileAccessPointTypeCOLO) GetConnectionLabelOk() (*string, bool) {
if o == nil || IsNil(o.ConnectionLabel) {
return nil, false
}
return o.ConnectionLabel, true
}
// HasConnectionLabel returns a boolean if a field has been set.
func (o *ServiceProfileAccessPointTypeCOLO) HasConnectionLabel() bool {
if o != nil && !IsNil(o.ConnectionLabel) {
return true
}
return false
}
// SetConnectionLabel gets a reference to the given string and assigns it to the ConnectionLabel field.
func (o *ServiceProfileAccessPointTypeCOLO) SetConnectionLabel(v string) {
o.ConnectionLabel = &v
}
// GetAuthenticationKey returns the AuthenticationKey field value if set, zero value otherwise.
func (o *ServiceProfileAccessPointTypeCOLO) GetAuthenticationKey() AuthenticationKey {
if o == nil || IsNil(o.AuthenticationKey) {
var ret AuthenticationKey
return ret
}
return *o.AuthenticationKey
}
// GetAuthenticationKeyOk returns a tuple with the AuthenticationKey field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceProfileAccessPointTypeCOLO) GetAuthenticationKeyOk() (*AuthenticationKey, bool) {
if o == nil || IsNil(o.AuthenticationKey) {
return nil, false
}
return o.AuthenticationKey, true
}
// HasAuthenticationKey returns a boolean if a field has been set.
func (o *ServiceProfileAccessPointTypeCOLO) HasAuthenticationKey() bool {
if o != nil && !IsNil(o.AuthenticationKey) {
return true
}
return false
}
// SetAuthenticationKey gets a reference to the given AuthenticationKey and assigns it to the AuthenticationKey field.
func (o *ServiceProfileAccessPointTypeCOLO) SetAuthenticationKey(v AuthenticationKey) {
o.AuthenticationKey = &v
}
// GetMetadata returns the Metadata field value if set, zero value otherwise.
func (o *ServiceProfileAccessPointTypeCOLO) GetMetadata() ServiceProfileMetadata {
if o == nil || IsNil(o.Metadata) {
var ret ServiceProfileMetadata
return ret
}
return *o.Metadata
}
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceProfileAccessPointTypeCOLO) GetMetadataOk() (*ServiceProfileMetadata, bool) {
if o == nil || IsNil(o.Metadata) {
return nil, false
}
return o.Metadata, true
}
// HasMetadata returns a boolean if a field has been set.
func (o *ServiceProfileAccessPointTypeCOLO) HasMetadata() bool {
if o != nil && !IsNil(o.Metadata) {
return true
}
return false
}
// SetMetadata gets a reference to the given ServiceProfileMetadata and assigns it to the Metadata field.
func (o *ServiceProfileAccessPointTypeCOLO) SetMetadata(v ServiceProfileMetadata) {
o.Metadata = &v
}
func (o ServiceProfileAccessPointTypeCOLO) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ServiceProfileAccessPointTypeCOLO) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Uuid) {
toSerialize["uuid"] = o.Uuid
}
toSerialize["type"] = o.Type
if !IsNil(o.SupportedBandwidths) {
toSerialize["supportedBandwidths"] = o.SupportedBandwidths
}
if !IsNil(o.AllowRemoteConnections) {
toSerialize["allowRemoteConnections"] = o.AllowRemoteConnections
}
if !IsNil(o.AllowCustomBandwidth) {
toSerialize["allowCustomBandwidth"] = o.AllowCustomBandwidth
}
if !IsNil(o.BandwidthAlertThreshold) {
toSerialize["bandwidthAlertThreshold"] = o.BandwidthAlertThreshold
}
if !IsNil(o.AllowBandwidthAutoApproval) {
toSerialize["allowBandwidthAutoApproval"] = o.AllowBandwidthAutoApproval
}
if !IsNil(o.AllowBandwidthUpgrade) {
toSerialize["allowBandwidthUpgrade"] = o.AllowBandwidthUpgrade
}
if !IsNil(o.LinkProtocolConfig) {
toSerialize["linkProtocolConfig"] = o.LinkProtocolConfig
}
if !IsNil(o.EnableAutoGenerateServiceKey) {
toSerialize["enableAutoGenerateServiceKey"] = o.EnableAutoGenerateServiceKey
}
if !IsNil(o.ConnectionRedundancyRequired) {
toSerialize["connectionRedundancyRequired"] = o.ConnectionRedundancyRequired
}
if !IsNil(o.ApiConfig) {
toSerialize["apiConfig"] = o.ApiConfig
}
if !IsNil(o.ConnectionLabel) {
toSerialize["connectionLabel"] = o.ConnectionLabel
}
if !IsNil(o.AuthenticationKey) {
toSerialize["authenticationKey"] = o.AuthenticationKey
}
if !IsNil(o.Metadata) {
toSerialize["metadata"] = o.Metadata
}
return toSerialize, nil
}
func (o *ServiceProfileAccessPointTypeCOLO) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"type",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err
}
for _, requiredProperty := range requiredProperties {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varServiceProfileAccessPointTypeCOLO := _ServiceProfileAccessPointTypeCOLO{}
decoder := json.NewDecoder(bytes.NewReader(data))
decoder.DisallowUnknownFields()
err = decoder.Decode(&varServiceProfileAccessPointTypeCOLO)
if err != nil {
return err
}
*o = ServiceProfileAccessPointTypeCOLO(varServiceProfileAccessPointTypeCOLO)
return err
}
type NullableServiceProfileAccessPointTypeCOLO struct {
value *ServiceProfileAccessPointTypeCOLO
isSet bool
}
func (v NullableServiceProfileAccessPointTypeCOLO) Get() *ServiceProfileAccessPointTypeCOLO {
return v.value
}
func (v *NullableServiceProfileAccessPointTypeCOLO) Set(val *ServiceProfileAccessPointTypeCOLO) {
v.value = val
v.isSet = true
}
func (v NullableServiceProfileAccessPointTypeCOLO) IsSet() bool {
return v.isSet
}
func (v *NullableServiceProfileAccessPointTypeCOLO) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableServiceProfileAccessPointTypeCOLO(val *ServiceProfileAccessPointTypeCOLO) *NullableServiceProfileAccessPointTypeCOLO {
return &NullableServiceProfileAccessPointTypeCOLO{value: val, isSet: true}
}
func (v NullableServiceProfileAccessPointTypeCOLO) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableServiceProfileAccessPointTypeCOLO) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}