-
Notifications
You must be signed in to change notification settings - Fork 4
/
model_ptp_advance_configuration.go
452 lines (378 loc) · 14.4 KB
/
model_ptp_advance_configuration.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
/*
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 (
"encoding/json"
)
// checks if the PtpAdvanceConfiguration type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PtpAdvanceConfiguration{}
// PtpAdvanceConfiguration struct for PtpAdvanceConfiguration
type PtpAdvanceConfiguration struct {
TimeScale *PtpAdvanceConfigurationTimeScale `json:"timeScale,omitempty"`
Domain *int32 `json:"domain,omitempty"`
Priority1 *int32 `json:"priority1,omitempty"`
Priority2 *int32 `json:"priority2,omitempty"`
// The mean time interval between Announce messages. A shorter interval makes ptp4l react faster to the changes in the master-slave hierarchy. The interval should be the same in the whole domain. It's specified as a power of two in seconds. The default is 1 (2 seconds).
LogAnnounceInterval *int32 `json:"logAnnounceInterval,omitempty"`
// The mean time interval between Sync messages. A shorter interval may improve accuracy of the local clock. It's specified as a power of two in seconds. The default is 0 (1 second).
LogSyncInterval *int32 `json:"logSyncInterval,omitempty"`
LogDelayReqInterval *int32 `json:"logDelayReqInterval,omitempty"`
TransportMode *PtpAdvanceConfigurationTransportMode `json:"transportMode,omitempty"`
// Unicast Grant Time in seconds. For Multicast and Hybrid transport modes, grant time defaults to 300 seconds. For Unicast mode, grant time can be between 30 to 7200.
GrantTime *int32 `json:"grantTime,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PtpAdvanceConfiguration PtpAdvanceConfiguration
// NewPtpAdvanceConfiguration instantiates a new PtpAdvanceConfiguration 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 NewPtpAdvanceConfiguration() *PtpAdvanceConfiguration {
this := PtpAdvanceConfiguration{}
return &this
}
// NewPtpAdvanceConfigurationWithDefaults instantiates a new PtpAdvanceConfiguration 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 NewPtpAdvanceConfigurationWithDefaults() *PtpAdvanceConfiguration {
this := PtpAdvanceConfiguration{}
return &this
}
// GetTimeScale returns the TimeScale field value if set, zero value otherwise.
func (o *PtpAdvanceConfiguration) GetTimeScale() PtpAdvanceConfigurationTimeScale {
if o == nil || IsNil(o.TimeScale) {
var ret PtpAdvanceConfigurationTimeScale
return ret
}
return *o.TimeScale
}
// GetTimeScaleOk returns a tuple with the TimeScale field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PtpAdvanceConfiguration) GetTimeScaleOk() (*PtpAdvanceConfigurationTimeScale, bool) {
if o == nil || IsNil(o.TimeScale) {
return nil, false
}
return o.TimeScale, true
}
// HasTimeScale returns a boolean if a field has been set.
func (o *PtpAdvanceConfiguration) HasTimeScale() bool {
if o != nil && !IsNil(o.TimeScale) {
return true
}
return false
}
// SetTimeScale gets a reference to the given PtpAdvanceConfigurationTimeScale and assigns it to the TimeScale field.
func (o *PtpAdvanceConfiguration) SetTimeScale(v PtpAdvanceConfigurationTimeScale) {
o.TimeScale = &v
}
// GetDomain returns the Domain field value if set, zero value otherwise.
func (o *PtpAdvanceConfiguration) GetDomain() int32 {
if o == nil || IsNil(o.Domain) {
var ret int32
return ret
}
return *o.Domain
}
// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PtpAdvanceConfiguration) GetDomainOk() (*int32, bool) {
if o == nil || IsNil(o.Domain) {
return nil, false
}
return o.Domain, true
}
// HasDomain returns a boolean if a field has been set.
func (o *PtpAdvanceConfiguration) HasDomain() bool {
if o != nil && !IsNil(o.Domain) {
return true
}
return false
}
// SetDomain gets a reference to the given int32 and assigns it to the Domain field.
func (o *PtpAdvanceConfiguration) SetDomain(v int32) {
o.Domain = &v
}
// GetPriority1 returns the Priority1 field value if set, zero value otherwise.
func (o *PtpAdvanceConfiguration) GetPriority1() int32 {
if o == nil || IsNil(o.Priority1) {
var ret int32
return ret
}
return *o.Priority1
}
// GetPriority1Ok returns a tuple with the Priority1 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PtpAdvanceConfiguration) GetPriority1Ok() (*int32, bool) {
if o == nil || IsNil(o.Priority1) {
return nil, false
}
return o.Priority1, true
}
// HasPriority1 returns a boolean if a field has been set.
func (o *PtpAdvanceConfiguration) HasPriority1() bool {
if o != nil && !IsNil(o.Priority1) {
return true
}
return false
}
// SetPriority1 gets a reference to the given int32 and assigns it to the Priority1 field.
func (o *PtpAdvanceConfiguration) SetPriority1(v int32) {
o.Priority1 = &v
}
// GetPriority2 returns the Priority2 field value if set, zero value otherwise.
func (o *PtpAdvanceConfiguration) GetPriority2() int32 {
if o == nil || IsNil(o.Priority2) {
var ret int32
return ret
}
return *o.Priority2
}
// GetPriority2Ok returns a tuple with the Priority2 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PtpAdvanceConfiguration) GetPriority2Ok() (*int32, bool) {
if o == nil || IsNil(o.Priority2) {
return nil, false
}
return o.Priority2, true
}
// HasPriority2 returns a boolean if a field has been set.
func (o *PtpAdvanceConfiguration) HasPriority2() bool {
if o != nil && !IsNil(o.Priority2) {
return true
}
return false
}
// SetPriority2 gets a reference to the given int32 and assigns it to the Priority2 field.
func (o *PtpAdvanceConfiguration) SetPriority2(v int32) {
o.Priority2 = &v
}
// GetLogAnnounceInterval returns the LogAnnounceInterval field value if set, zero value otherwise.
func (o *PtpAdvanceConfiguration) GetLogAnnounceInterval() int32 {
if o == nil || IsNil(o.LogAnnounceInterval) {
var ret int32
return ret
}
return *o.LogAnnounceInterval
}
// GetLogAnnounceIntervalOk returns a tuple with the LogAnnounceInterval field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PtpAdvanceConfiguration) GetLogAnnounceIntervalOk() (*int32, bool) {
if o == nil || IsNil(o.LogAnnounceInterval) {
return nil, false
}
return o.LogAnnounceInterval, true
}
// HasLogAnnounceInterval returns a boolean if a field has been set.
func (o *PtpAdvanceConfiguration) HasLogAnnounceInterval() bool {
if o != nil && !IsNil(o.LogAnnounceInterval) {
return true
}
return false
}
// SetLogAnnounceInterval gets a reference to the given int32 and assigns it to the LogAnnounceInterval field.
func (o *PtpAdvanceConfiguration) SetLogAnnounceInterval(v int32) {
o.LogAnnounceInterval = &v
}
// GetLogSyncInterval returns the LogSyncInterval field value if set, zero value otherwise.
func (o *PtpAdvanceConfiguration) GetLogSyncInterval() int32 {
if o == nil || IsNil(o.LogSyncInterval) {
var ret int32
return ret
}
return *o.LogSyncInterval
}
// GetLogSyncIntervalOk returns a tuple with the LogSyncInterval field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PtpAdvanceConfiguration) GetLogSyncIntervalOk() (*int32, bool) {
if o == nil || IsNil(o.LogSyncInterval) {
return nil, false
}
return o.LogSyncInterval, true
}
// HasLogSyncInterval returns a boolean if a field has been set.
func (o *PtpAdvanceConfiguration) HasLogSyncInterval() bool {
if o != nil && !IsNil(o.LogSyncInterval) {
return true
}
return false
}
// SetLogSyncInterval gets a reference to the given int32 and assigns it to the LogSyncInterval field.
func (o *PtpAdvanceConfiguration) SetLogSyncInterval(v int32) {
o.LogSyncInterval = &v
}
// GetLogDelayReqInterval returns the LogDelayReqInterval field value if set, zero value otherwise.
func (o *PtpAdvanceConfiguration) GetLogDelayReqInterval() int32 {
if o == nil || IsNil(o.LogDelayReqInterval) {
var ret int32
return ret
}
return *o.LogDelayReqInterval
}
// GetLogDelayReqIntervalOk returns a tuple with the LogDelayReqInterval field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PtpAdvanceConfiguration) GetLogDelayReqIntervalOk() (*int32, bool) {
if o == nil || IsNil(o.LogDelayReqInterval) {
return nil, false
}
return o.LogDelayReqInterval, true
}
// HasLogDelayReqInterval returns a boolean if a field has been set.
func (o *PtpAdvanceConfiguration) HasLogDelayReqInterval() bool {
if o != nil && !IsNil(o.LogDelayReqInterval) {
return true
}
return false
}
// SetLogDelayReqInterval gets a reference to the given int32 and assigns it to the LogDelayReqInterval field.
func (o *PtpAdvanceConfiguration) SetLogDelayReqInterval(v int32) {
o.LogDelayReqInterval = &v
}
// GetTransportMode returns the TransportMode field value if set, zero value otherwise.
func (o *PtpAdvanceConfiguration) GetTransportMode() PtpAdvanceConfigurationTransportMode {
if o == nil || IsNil(o.TransportMode) {
var ret PtpAdvanceConfigurationTransportMode
return ret
}
return *o.TransportMode
}
// GetTransportModeOk returns a tuple with the TransportMode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PtpAdvanceConfiguration) GetTransportModeOk() (*PtpAdvanceConfigurationTransportMode, bool) {
if o == nil || IsNil(o.TransportMode) {
return nil, false
}
return o.TransportMode, true
}
// HasTransportMode returns a boolean if a field has been set.
func (o *PtpAdvanceConfiguration) HasTransportMode() bool {
if o != nil && !IsNil(o.TransportMode) {
return true
}
return false
}
// SetTransportMode gets a reference to the given PtpAdvanceConfigurationTransportMode and assigns it to the TransportMode field.
func (o *PtpAdvanceConfiguration) SetTransportMode(v PtpAdvanceConfigurationTransportMode) {
o.TransportMode = &v
}
// GetGrantTime returns the GrantTime field value if set, zero value otherwise.
func (o *PtpAdvanceConfiguration) GetGrantTime() int32 {
if o == nil || IsNil(o.GrantTime) {
var ret int32
return ret
}
return *o.GrantTime
}
// GetGrantTimeOk returns a tuple with the GrantTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PtpAdvanceConfiguration) GetGrantTimeOk() (*int32, bool) {
if o == nil || IsNil(o.GrantTime) {
return nil, false
}
return o.GrantTime, true
}
// HasGrantTime returns a boolean if a field has been set.
func (o *PtpAdvanceConfiguration) HasGrantTime() bool {
if o != nil && !IsNil(o.GrantTime) {
return true
}
return false
}
// SetGrantTime gets a reference to the given int32 and assigns it to the GrantTime field.
func (o *PtpAdvanceConfiguration) SetGrantTime(v int32) {
o.GrantTime = &v
}
func (o PtpAdvanceConfiguration) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PtpAdvanceConfiguration) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.TimeScale) {
toSerialize["timeScale"] = o.TimeScale
}
if !IsNil(o.Domain) {
toSerialize["domain"] = o.Domain
}
if !IsNil(o.Priority1) {
toSerialize["priority1"] = o.Priority1
}
if !IsNil(o.Priority2) {
toSerialize["priority2"] = o.Priority2
}
if !IsNil(o.LogAnnounceInterval) {
toSerialize["logAnnounceInterval"] = o.LogAnnounceInterval
}
if !IsNil(o.LogSyncInterval) {
toSerialize["logSyncInterval"] = o.LogSyncInterval
}
if !IsNil(o.LogDelayReqInterval) {
toSerialize["logDelayReqInterval"] = o.LogDelayReqInterval
}
if !IsNil(o.TransportMode) {
toSerialize["transportMode"] = o.TransportMode
}
if !IsNil(o.GrantTime) {
toSerialize["grantTime"] = o.GrantTime
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PtpAdvanceConfiguration) UnmarshalJSON(data []byte) (err error) {
varPtpAdvanceConfiguration := _PtpAdvanceConfiguration{}
err = json.Unmarshal(data, &varPtpAdvanceConfiguration)
if err != nil {
return err
}
*o = PtpAdvanceConfiguration(varPtpAdvanceConfiguration)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "timeScale")
delete(additionalProperties, "domain")
delete(additionalProperties, "priority1")
delete(additionalProperties, "priority2")
delete(additionalProperties, "logAnnounceInterval")
delete(additionalProperties, "logSyncInterval")
delete(additionalProperties, "logDelayReqInterval")
delete(additionalProperties, "transportMode")
delete(additionalProperties, "grantTime")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePtpAdvanceConfiguration struct {
value *PtpAdvanceConfiguration
isSet bool
}
func (v NullablePtpAdvanceConfiguration) Get() *PtpAdvanceConfiguration {
return v.value
}
func (v *NullablePtpAdvanceConfiguration) Set(val *PtpAdvanceConfiguration) {
v.value = val
v.isSet = true
}
func (v NullablePtpAdvanceConfiguration) IsSet() bool {
return v.isSet
}
func (v *NullablePtpAdvanceConfiguration) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePtpAdvanceConfiguration(val *PtpAdvanceConfiguration) *NullablePtpAdvanceConfiguration {
return &NullablePtpAdvanceConfiguration{value: val, isSet: true}
}
func (v NullablePtpAdvanceConfiguration) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePtpAdvanceConfiguration) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}