-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_domain.go
633 lines (542 loc) · 17.6 KB
/
model_domain.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
/*
Linode API
[Read the API documentation](https://techdocs.akamai.com/linode-api/reference/api).
API version: 4.189.2
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// checks if the Domain type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Domain{}
// Domain A domain zonefile in our DNS system. You must own the domain name and tell your registrar to use Linode's nameservers in order for a domain in our system to be treated as authoritative.
type Domain struct {
// The list of IPs that may perform a zone transfer for this Domain. The total combined length of all data within this array cannot exceed 1000 characters. __Note__. This is potentially dangerous, and should be set to an empty list unless you intend to use it.
AxfrIps []string `json:"axfr_ips,omitempty"`
// A description for this Domain. This is for display purposes only.
Description *string `json:"description,omitempty"`
// The domain this Domain represents. Domain labels cannot be longer than 63 characters and must conform to [RFC1035](https://tools.ietf.org/html/rfc1035). Domains must be unique on Linode's platform, including across different Linode accounts; there cannot be two Domains representing the same domain.
Domain *string `json:"domain,omitempty" validate:"regexp=^(\\\\*\\\\.)?([a-zA-Z0-9-_]{1,63}\\\\.)+([a-zA-Z]{2,3}\\\\.)?([a-zA-Z]{2,16}|xn--[a-zA-Z0-9]+)$"`
// The amount of time in seconds that may pass before this Domain is no longer authoritative. - Valid values are 0, 30, 120, 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200. - Any other value is rounded up to the nearest valid value. - A value of 0 is equivalent to the default value of 1209600.
ExpireSec *int32 `json:"expire_sec,omitempty"`
// The group this Domain belongs to. This is for display purposes only.
// Deprecated
Group *string `json:"group,omitempty"`
// This Domain's unique ID.
Id *int32 `json:"id,omitempty"`
// The IP addresses representing the master DNS for this Domain. At least one value is required for `type` slave Domains. The total combined length of all data within this array cannot exceed 1000 characters.
MasterIps []string `json:"master_ips,omitempty"`
// The amount of time in seconds before this Domain should be refreshed. - Valid values are 0, 30, 120, 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200. - Any other value is rounded up to the nearest valid value. - A value of 0 is equivalent to the default value of 14400.
RefreshSec *int32 `json:"refresh_sec,omitempty"`
// The interval, in seconds, at which a failed refresh should be retried. - Valid values are 0, 30, 120, 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200. - Any other value is rounded up to the nearest valid value. - A value of 0 is equivalent to the default value of 14400.
RetrySec *int32 `json:"retry_sec,omitempty"`
// Start of Authority email address. This is required for `type` master Domains.
SoaEmail *string `json:"soa_email,omitempty"`
// Used to control whether this Domain is currently being rendered.
Status *string `json:"status,omitempty"`
// An array of tags applied to this object. Tags are for organizational purposes only.
Tags []string `json:"tags,omitempty"`
// \"Time to Live\" - the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers. - Valid values are 0, 30, 120, 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200. - Any other value is rounded up to the nearest valid value. - A value of 0 is equivalent to the default value of 86400.
TtlSec *int32 `json:"ttl_sec,omitempty"`
// Whether this Domain represents the authoritative source of information for the domain it describes (`master`), or whether it is a read-only copy of a master (`slave`).
Type *string `json:"type,omitempty"`
}
// NewDomain instantiates a new Domain 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 NewDomain() *Domain {
this := Domain{}
var expireSec int32 = 0
this.ExpireSec = &expireSec
var refreshSec int32 = 0
this.RefreshSec = &refreshSec
var retrySec int32 = 0
this.RetrySec = &retrySec
var status string = "active"
this.Status = &status
var ttlSec int32 = 0
this.TtlSec = &ttlSec
return &this
}
// NewDomainWithDefaults instantiates a new Domain 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 NewDomainWithDefaults() *Domain {
this := Domain{}
var expireSec int32 = 0
this.ExpireSec = &expireSec
var refreshSec int32 = 0
this.RefreshSec = &refreshSec
var retrySec int32 = 0
this.RetrySec = &retrySec
var status string = "active"
this.Status = &status
var ttlSec int32 = 0
this.TtlSec = &ttlSec
return &this
}
// GetAxfrIps returns the AxfrIps field value if set, zero value otherwise.
func (o *Domain) GetAxfrIps() []string {
if o == nil || IsNil(o.AxfrIps) {
var ret []string
return ret
}
return o.AxfrIps
}
// GetAxfrIpsOk returns a tuple with the AxfrIps field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Domain) GetAxfrIpsOk() ([]string, bool) {
if o == nil || IsNil(o.AxfrIps) {
return nil, false
}
return o.AxfrIps, true
}
// HasAxfrIps returns a boolean if a field has been set.
func (o *Domain) HasAxfrIps() bool {
if o != nil && !IsNil(o.AxfrIps) {
return true
}
return false
}
// SetAxfrIps gets a reference to the given []string and assigns it to the AxfrIps field.
func (o *Domain) SetAxfrIps(v []string) {
o.AxfrIps = v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *Domain) GetDescription() string {
if o == nil || IsNil(o.Description) {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Domain) GetDescriptionOk() (*string, bool) {
if o == nil || IsNil(o.Description) {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *Domain) HasDescription() bool {
if o != nil && !IsNil(o.Description) {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *Domain) SetDescription(v string) {
o.Description = &v
}
// GetDomain returns the Domain field value if set, zero value otherwise.
func (o *Domain) GetDomain() string {
if o == nil || IsNil(o.Domain) {
var ret string
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 *Domain) GetDomainOk() (*string, 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 *Domain) HasDomain() bool {
if o != nil && !IsNil(o.Domain) {
return true
}
return false
}
// SetDomain gets a reference to the given string and assigns it to the Domain field.
func (o *Domain) SetDomain(v string) {
o.Domain = &v
}
// GetExpireSec returns the ExpireSec field value if set, zero value otherwise.
func (o *Domain) GetExpireSec() int32 {
if o == nil || IsNil(o.ExpireSec) {
var ret int32
return ret
}
return *o.ExpireSec
}
// GetExpireSecOk returns a tuple with the ExpireSec field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Domain) GetExpireSecOk() (*int32, bool) {
if o == nil || IsNil(o.ExpireSec) {
return nil, false
}
return o.ExpireSec, true
}
// HasExpireSec returns a boolean if a field has been set.
func (o *Domain) HasExpireSec() bool {
if o != nil && !IsNil(o.ExpireSec) {
return true
}
return false
}
// SetExpireSec gets a reference to the given int32 and assigns it to the ExpireSec field.
func (o *Domain) SetExpireSec(v int32) {
o.ExpireSec = &v
}
// GetGroup returns the Group field value if set, zero value otherwise.
// Deprecated
func (o *Domain) GetGroup() string {
if o == nil || IsNil(o.Group) {
var ret string
return ret
}
return *o.Group
}
// GetGroupOk returns a tuple with the Group field value if set, nil otherwise
// and a boolean to check if the value has been set.
// Deprecated
func (o *Domain) GetGroupOk() (*string, bool) {
if o == nil || IsNil(o.Group) {
return nil, false
}
return o.Group, true
}
// HasGroup returns a boolean if a field has been set.
func (o *Domain) HasGroup() bool {
if o != nil && !IsNil(o.Group) {
return true
}
return false
}
// SetGroup gets a reference to the given string and assigns it to the Group field.
// Deprecated
func (o *Domain) SetGroup(v string) {
o.Group = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Domain) GetId() int32 {
if o == nil || IsNil(o.Id) {
var ret int32
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Domain) GetIdOk() (*int32, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *Domain) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given int32 and assigns it to the Id field.
func (o *Domain) SetId(v int32) {
o.Id = &v
}
// GetMasterIps returns the MasterIps field value if set, zero value otherwise.
func (o *Domain) GetMasterIps() []string {
if o == nil || IsNil(o.MasterIps) {
var ret []string
return ret
}
return o.MasterIps
}
// GetMasterIpsOk returns a tuple with the MasterIps field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Domain) GetMasterIpsOk() ([]string, bool) {
if o == nil || IsNil(o.MasterIps) {
return nil, false
}
return o.MasterIps, true
}
// HasMasterIps returns a boolean if a field has been set.
func (o *Domain) HasMasterIps() bool {
if o != nil && !IsNil(o.MasterIps) {
return true
}
return false
}
// SetMasterIps gets a reference to the given []string and assigns it to the MasterIps field.
func (o *Domain) SetMasterIps(v []string) {
o.MasterIps = v
}
// GetRefreshSec returns the RefreshSec field value if set, zero value otherwise.
func (o *Domain) GetRefreshSec() int32 {
if o == nil || IsNil(o.RefreshSec) {
var ret int32
return ret
}
return *o.RefreshSec
}
// GetRefreshSecOk returns a tuple with the RefreshSec field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Domain) GetRefreshSecOk() (*int32, bool) {
if o == nil || IsNil(o.RefreshSec) {
return nil, false
}
return o.RefreshSec, true
}
// HasRefreshSec returns a boolean if a field has been set.
func (o *Domain) HasRefreshSec() bool {
if o != nil && !IsNil(o.RefreshSec) {
return true
}
return false
}
// SetRefreshSec gets a reference to the given int32 and assigns it to the RefreshSec field.
func (o *Domain) SetRefreshSec(v int32) {
o.RefreshSec = &v
}
// GetRetrySec returns the RetrySec field value if set, zero value otherwise.
func (o *Domain) GetRetrySec() int32 {
if o == nil || IsNil(o.RetrySec) {
var ret int32
return ret
}
return *o.RetrySec
}
// GetRetrySecOk returns a tuple with the RetrySec field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Domain) GetRetrySecOk() (*int32, bool) {
if o == nil || IsNil(o.RetrySec) {
return nil, false
}
return o.RetrySec, true
}
// HasRetrySec returns a boolean if a field has been set.
func (o *Domain) HasRetrySec() bool {
if o != nil && !IsNil(o.RetrySec) {
return true
}
return false
}
// SetRetrySec gets a reference to the given int32 and assigns it to the RetrySec field.
func (o *Domain) SetRetrySec(v int32) {
o.RetrySec = &v
}
// GetSoaEmail returns the SoaEmail field value if set, zero value otherwise.
func (o *Domain) GetSoaEmail() string {
if o == nil || IsNil(o.SoaEmail) {
var ret string
return ret
}
return *o.SoaEmail
}
// GetSoaEmailOk returns a tuple with the SoaEmail field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Domain) GetSoaEmailOk() (*string, bool) {
if o == nil || IsNil(o.SoaEmail) {
return nil, false
}
return o.SoaEmail, true
}
// HasSoaEmail returns a boolean if a field has been set.
func (o *Domain) HasSoaEmail() bool {
if o != nil && !IsNil(o.SoaEmail) {
return true
}
return false
}
// SetSoaEmail gets a reference to the given string and assigns it to the SoaEmail field.
func (o *Domain) SetSoaEmail(v string) {
o.SoaEmail = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *Domain) 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 *Domain) 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 *Domain) 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 *Domain) SetStatus(v string) {
o.Status = &v
}
// GetTags returns the Tags field value if set, zero value otherwise.
func (o *Domain) GetTags() []string {
if o == nil || IsNil(o.Tags) {
var ret []string
return ret
}
return o.Tags
}
// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Domain) GetTagsOk() ([]string, bool) {
if o == nil || IsNil(o.Tags) {
return nil, false
}
return o.Tags, true
}
// HasTags returns a boolean if a field has been set.
func (o *Domain) HasTags() bool {
if o != nil && !IsNil(o.Tags) {
return true
}
return false
}
// SetTags gets a reference to the given []string and assigns it to the Tags field.
func (o *Domain) SetTags(v []string) {
o.Tags = v
}
// GetTtlSec returns the TtlSec field value if set, zero value otherwise.
func (o *Domain) GetTtlSec() int32 {
if o == nil || IsNil(o.TtlSec) {
var ret int32
return ret
}
return *o.TtlSec
}
// GetTtlSecOk returns a tuple with the TtlSec field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Domain) GetTtlSecOk() (*int32, bool) {
if o == nil || IsNil(o.TtlSec) {
return nil, false
}
return o.TtlSec, true
}
// HasTtlSec returns a boolean if a field has been set.
func (o *Domain) HasTtlSec() bool {
if o != nil && !IsNil(o.TtlSec) {
return true
}
return false
}
// SetTtlSec gets a reference to the given int32 and assigns it to the TtlSec field.
func (o *Domain) SetTtlSec(v int32) {
o.TtlSec = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *Domain) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Domain) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *Domain) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *Domain) SetType(v string) {
o.Type = &v
}
func (o Domain) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Domain) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AxfrIps) {
toSerialize["axfr_ips"] = o.AxfrIps
}
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
if !IsNil(o.Domain) {
toSerialize["domain"] = o.Domain
}
if !IsNil(o.ExpireSec) {
toSerialize["expire_sec"] = o.ExpireSec
}
if !IsNil(o.Group) {
toSerialize["group"] = o.Group
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.MasterIps) {
toSerialize["master_ips"] = o.MasterIps
}
if !IsNil(o.RefreshSec) {
toSerialize["refresh_sec"] = o.RefreshSec
}
if !IsNil(o.RetrySec) {
toSerialize["retry_sec"] = o.RetrySec
}
if !IsNil(o.SoaEmail) {
toSerialize["soa_email"] = o.SoaEmail
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Tags) {
toSerialize["tags"] = o.Tags
}
if !IsNil(o.TtlSec) {
toSerialize["ttl_sec"] = o.TtlSec
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
return toSerialize, nil
}
type NullableDomain struct {
value *Domain
isSet bool
}
func (v NullableDomain) Get() *Domain {
return v.value
}
func (v *NullableDomain) Set(val *Domain) {
v.value = val
v.isSet = true
}
func (v NullableDomain) IsSet() bool {
return v.isSet
}
func (v *NullableDomain) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDomain(val *Domain) *NullableDomain {
return &NullableDomain{value: val, isSet: true}
}
func (v NullableDomain) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDomain) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}