/
domain_sdk.go
4393 lines (3378 loc) · 128 KB
/
domain_sdk.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// This file was automatically generated. DO NOT EDIT.
// If you have any remark or suggestion do not hesitate to open an issue.
// Package domain provides methods and message types of the domain v2beta1 API.
package domain
import (
"bytes"
"encoding/json"
"fmt"
"net"
"net/http"
"net/url"
"strings"
"time"
"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sdk-go/internal/marshaler"
"github.com/scaleway/scaleway-sdk-go/internal/parameter"
"github.com/scaleway/scaleway-sdk-go/namegenerator"
"github.com/scaleway/scaleway-sdk-go/scw"
std "github.com/scaleway/scaleway-sdk-go/api/std"
)
// always import dependencies
var (
_ fmt.Stringer
_ json.Unmarshaler
_ url.URL
_ net.IP
_ http.Header
_ bytes.Reader
_ time.Time
_ = strings.Join
_ scw.ScalewayRequest
_ marshaler.Duration
_ scw.File
_ = parameter.AddToQuery
_ = namegenerator.GetRandomName
)
type ContactEmailStatus string
const (
// If unspecified, the status is unknown by default.
ContactEmailStatusEmailStatusUnknown = ContactEmailStatus("email_status_unknown")
// The contact email has been validated.
ContactEmailStatusValidated = ContactEmailStatus("validated")
// The contact email has not been validated.
ContactEmailStatusNotValidated = ContactEmailStatus("not_validated")
// The contact email is invalid.
ContactEmailStatusInvalidEmail = ContactEmailStatus("invalid_email")
)
func (enum ContactEmailStatus) String() string {
if enum == "" {
// return default value if empty
return "email_status_unknown"
}
return string(enum)
}
func (enum ContactEmailStatus) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *ContactEmailStatus) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = ContactEmailStatus(ContactEmailStatus(tmp).String())
return nil
}
type ContactExtensionFRMode string
const (
// If unspecified, the status is unknown by default.
ContactExtensionFRModeModeUnknown = ContactExtensionFRMode("mode_unknown")
// The contact is a physical person (only for .fr domains).
ContactExtensionFRModeIndividual = ContactExtensionFRMode("individual")
// The contact is a company with a SIRET/SIREN code (only for .fr domains).
ContactExtensionFRModeCompanyIdentificationCode = ContactExtensionFRMode("company_identification_code")
// The contact has a Data Universal Numbering System code (only for .fr domains).
ContactExtensionFRModeDuns = ContactExtensionFRMode("duns")
// The contact has a local or a country ID (only for .fr domains).
ContactExtensionFRModeLocal = ContactExtensionFRMode("local")
// The contact is an association (only for .fr domains).
ContactExtensionFRModeAssociation = ContactExtensionFRMode("association")
// The contact is a brand (only for .fr domains).
ContactExtensionFRModeTrademark = ContactExtensionFRMode("trademark")
// The contact has an intervention code (DSIA) from AFNIC (only for .fr domains).
ContactExtensionFRModeCodeAuthAfnic = ContactExtensionFRMode("code_auth_afnic")
)
func (enum ContactExtensionFRMode) String() string {
if enum == "" {
// return default value if empty
return "mode_unknown"
}
return string(enum)
}
func (enum ContactExtensionFRMode) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *ContactExtensionFRMode) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = ContactExtensionFRMode(ContactExtensionFRMode(tmp).String())
return nil
}
type ContactExtensionNLLegalForm string
const (
// If unspecified, the status is unknown by default.
ContactExtensionNLLegalFormLegalFormUnknown = ContactExtensionNLLegalForm("legal_form_unknown")
// The contact's legal form is not listed below (only for .nl domains).
ContactExtensionNLLegalFormOther = ContactExtensionNLLegalForm("other")
// The contact is a non-Dutch EC company (only for .nl domains).
ContactExtensionNLLegalFormNonDutchEuCompany = ContactExtensionNLLegalForm("non_dutch_eu_company")
// The contact is a non-Dutch legal form/enterprise/subsidiary (only for .nl domains).
ContactExtensionNLLegalFormNonDutchLegalFormEnterpriseSubsidiary = ContactExtensionNLLegalForm("non_dutch_legal_form_enterprise_subsidiary")
// The contact is a limited company (only for .nl domains).
ContactExtensionNLLegalFormLimitedCompany = ContactExtensionNLLegalForm("limited_company")
// The contact is a limited company in formation (only for .nl domains).
ContactExtensionNLLegalFormLimitedCompanyInFormation = ContactExtensionNLLegalForm("limited_company_in_formation")
// The contact is a cooperative (only for .nl domains).
ContactExtensionNLLegalFormCooperative = ContactExtensionNLLegalForm("cooperative")
// The contact is a limited Partnership (only for .nl domains).
ContactExtensionNLLegalFormLimitedPartnership = ContactExtensionNLLegalForm("limited_partnership")
// The contact is a sole trader (only for .nl domains).
ContactExtensionNLLegalFormSoleCompany = ContactExtensionNLLegalForm("sole_company")
// The contact is a European Economic Interest Group (only for .nl domains).
ContactExtensionNLLegalFormEuropeanEconomicInterestGroup = ContactExtensionNLLegalForm("european_economic_interest_group")
// The contact is a religious society (only for .nl domains).
ContactExtensionNLLegalFormReligiousEntity = ContactExtensionNLLegalForm("religious_entity")
// The contact is a partnership (only for .nl domains).
ContactExtensionNLLegalFormPartnership = ContactExtensionNLLegalForm("partnership")
// The contact is a public Company (only for .nl domains).
ContactExtensionNLLegalFormPublicCompany = ContactExtensionNLLegalForm("public_company")
// The contact is a mutual benefit company (only for .nl domains).
ContactExtensionNLLegalFormMutualBenefitCompany = ContactExtensionNLLegalForm("mutual_benefit_company")
// The contact is a natural person (only for .nl domains).
ContactExtensionNLLegalFormResidential = ContactExtensionNLLegalForm("residential")
// The contact is a shipping company (only for .nl domains).
ContactExtensionNLLegalFormShippingCompany = ContactExtensionNLLegalForm("shipping_company")
// The contact is a foundation (only for .nl domains).
ContactExtensionNLLegalFormFoundation = ContactExtensionNLLegalForm("foundation")
// The contact is a association (only for .nl domains).
ContactExtensionNLLegalFormAssociation = ContactExtensionNLLegalForm("association")
// The contact is a trading partnership (only for .nl domains).
ContactExtensionNLLegalFormTradingPartnership = ContactExtensionNLLegalForm("trading_partnership")
// The contact is a physical person (only for .nl domains).
ContactExtensionNLLegalFormNaturalPerson = ContactExtensionNLLegalForm("natural_person")
)
func (enum ContactExtensionNLLegalForm) String() string {
if enum == "" {
// return default value if empty
return "legal_form_unknown"
}
return string(enum)
}
func (enum ContactExtensionNLLegalForm) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *ContactExtensionNLLegalForm) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = ContactExtensionNLLegalForm(ContactExtensionNLLegalForm(tmp).String())
return nil
}
type ContactLegalForm string
const (
// If unspecified, the status is unknown by default.
ContactLegalFormLegalFormUnknown = ContactLegalForm("legal_form_unknown")
// The contact is a physical person.
ContactLegalFormIndividual = ContactLegalForm("individual")
// The contact is a corporate or a society.
ContactLegalFormCorporate = ContactLegalForm("corporate")
// The contact is an association.
ContactLegalFormAssociation = ContactLegalForm("association")
// The contact is not represented by a physical person, a corporate or an association.
ContactLegalFormOther = ContactLegalForm("other")
)
func (enum ContactLegalForm) String() string {
if enum == "" {
// return default value if empty
return "legal_form_unknown"
}
return string(enum)
}
func (enum ContactLegalForm) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *ContactLegalForm) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = ContactLegalForm(ContactLegalForm(tmp).String())
return nil
}
type ContactStatus string
const (
// If unspecified, the status is unknown by default.
ContactStatusStatusUnknown = ContactStatus("status_unknown")
// The contact is active and can be edited.
ContactStatusActive = ContactStatus("active")
// The contact is temporarily locked (ie. while being edited).
ContactStatusPending = ContactStatus("pending")
)
func (enum ContactStatus) String() string {
if enum == "" {
// return default value if empty
return "status_unknown"
}
return string(enum)
}
func (enum ContactStatus) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *ContactStatus) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = ContactStatus(ContactStatus(tmp).String())
return nil
}
type DNSZoneStatus string
const (
// If unspecified, the DNS zone's status is unknown by default.
DNSZoneStatusUnknown = DNSZoneStatus("unknown")
// The DNS zone is active and healthy.
DNSZoneStatusActive = DNSZoneStatus("active")
// The DNS zone is updating.
DNSZoneStatusPending = DNSZoneStatus("pending")
// An error occurred after updating the DNS zone.
DNSZoneStatusError = DNSZoneStatus("error")
// The DNS zone is locked and cannot be updated anymore.
DNSZoneStatusLocked = DNSZoneStatus("locked")
)
func (enum DNSZoneStatus) String() string {
if enum == "" {
// return default value if empty
return "unknown"
}
return string(enum)
}
func (enum DNSZoneStatus) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *DNSZoneStatus) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = DNSZoneStatus(DNSZoneStatus(tmp).String())
return nil
}
type DSRecordAlgorithm string
const (
// Code 1, algorithm: 'RSAMD5'.
DSRecordAlgorithmRsamd5 = DSRecordAlgorithm("rsamd5")
// Code 2, algorithm: 'DIFFIE_HELLMAN'.
DSRecordAlgorithmDh = DSRecordAlgorithm("dh")
// Code 3, algorithm: 'DSA_SHA1'.
DSRecordAlgorithmDsa = DSRecordAlgorithm("dsa")
// Code 5, algorithm: 'RSA_SHA1'.
DSRecordAlgorithmRsasha1 = DSRecordAlgorithm("rsasha1")
// Code 6, algorithm: 'DSA_NSEC3_SHA1'.
DSRecordAlgorithmDsaNsec3Sha1 = DSRecordAlgorithm("dsa_nsec3_sha1")
// Code 7, algorithm: 'RSASHA1_NSEC3_SHA1'.
DSRecordAlgorithmRsasha1Nsec3Sha1 = DSRecordAlgorithm("rsasha1_nsec3_sha1")
// Code 8, algorithm: 'RSASHA256'.
DSRecordAlgorithmRsasha256 = DSRecordAlgorithm("rsasha256")
// Code 10, algorithm: 'RSASHA512'.
DSRecordAlgorithmRsasha512 = DSRecordAlgorithm("rsasha512")
// Code 12, algorithm: 'ECC_GOST'.
DSRecordAlgorithmEccGost = DSRecordAlgorithm("ecc_gost")
// Code 13, algorithm: 'ECDSAP256SHA256'.
DSRecordAlgorithmEcdsap256sha256 = DSRecordAlgorithm("ecdsap256sha256")
// Code 14, algorithm: 'ECDSAP384SHA384'.
DSRecordAlgorithmEcdsap384sha384 = DSRecordAlgorithm("ecdsap384sha384")
// Code 15, algorithm: 'ED25519'.
DSRecordAlgorithmEd25519 = DSRecordAlgorithm("ed25519")
// Code 16, algorithm: 'ED448'.
DSRecordAlgorithmEd448 = DSRecordAlgorithm("ed448")
)
func (enum DSRecordAlgorithm) String() string {
if enum == "" {
// return default value if empty
return "rsamd5"
}
return string(enum)
}
func (enum DSRecordAlgorithm) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *DSRecordAlgorithm) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = DSRecordAlgorithm(DSRecordAlgorithm(tmp).String())
return nil
}
type DSRecordDigestType string
const (
// Code 1, digest type: 'SHA_1'.
DSRecordDigestTypeSha1 = DSRecordDigestType("sha_1")
// Code 2, digest type: 'SHA_256'.
DSRecordDigestTypeSha256 = DSRecordDigestType("sha_256")
// Code 3, digest type: 'GOST_R_34_11_94'.
DSRecordDigestTypeGostR34_11_94 = DSRecordDigestType("gost_r_34_11_94")
// Code 4, digest type: 'SHA_384'.
DSRecordDigestTypeSha384 = DSRecordDigestType("sha_384")
)
func (enum DSRecordDigestType) String() string {
if enum == "" {
// return default value if empty
return "sha_1"
}
return string(enum)
}
func (enum DSRecordDigestType) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *DSRecordDigestType) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = DSRecordDigestType(DSRecordDigestType(tmp).String())
return nil
}
type DomainFeatureStatus string
const (
// Default unknown status.
DomainFeatureStatusFeatureStatusUnknown = DomainFeatureStatus("feature_status_unknown")
// A feature (auto renew, DNSSEC) is being enabled.
DomainFeatureStatusEnabling = DomainFeatureStatus("enabling")
// A feature (auto renew, DNSSEC) has been enabled.
DomainFeatureStatusEnabled = DomainFeatureStatus("enabled")
// A feature (auto renew, DNSSEC) is being disabled.
DomainFeatureStatusDisabling = DomainFeatureStatus("disabling")
// A feature (auto renew, DNSSEC) has been disabled.
DomainFeatureStatusDisabled = DomainFeatureStatus("disabled")
)
func (enum DomainFeatureStatus) String() string {
if enum == "" {
// return default value if empty
return "feature_status_unknown"
}
return string(enum)
}
func (enum DomainFeatureStatus) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *DomainFeatureStatus) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = DomainFeatureStatus(DomainFeatureStatus(tmp).String())
return nil
}
type DomainRegistrationStatusTransferStatus string
const (
// If unspecified, the status is unknown by default.
DomainRegistrationStatusTransferStatusStatusUnknown = DomainRegistrationStatusTransferStatus("status_unknown")
// The domain transfer is being initialized.
DomainRegistrationStatusTransferStatusPending = DomainRegistrationStatusTransferStatus("pending")
// The domain transfer has started. The process can be accelerated if you accept the vote.
DomainRegistrationStatusTransferStatusWaitingVote = DomainRegistrationStatusTransferStatus("waiting_vote")
// The domain transfer has been rejected.
DomainRegistrationStatusTransferStatusRejected = DomainRegistrationStatusTransferStatus("rejected")
// The domain transfer has been accepted. Your resources are being created.
DomainRegistrationStatusTransferStatusProcessing = DomainRegistrationStatusTransferStatus("processing")
// The domain transfer is complete.
DomainRegistrationStatusTransferStatusDone = DomainRegistrationStatusTransferStatus("done")
)
func (enum DomainRegistrationStatusTransferStatus) String() string {
if enum == "" {
// return default value if empty
return "status_unknown"
}
return string(enum)
}
func (enum DomainRegistrationStatusTransferStatus) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *DomainRegistrationStatusTransferStatus) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = DomainRegistrationStatusTransferStatus(DomainRegistrationStatusTransferStatus(tmp).String())
return nil
}
type DomainStatus string
const (
// If unspecified, the status is unknown by default.
DomainStatusStatusUnknown = DomainStatus("status_unknown")
// The domain is active.
DomainStatusActive = DomainStatus("active")
// The domain is in the process of being created.
DomainStatusCreating = DomainStatus("creating")
// An error occurred during the domain's creation process.
DomainStatusCreateError = DomainStatus("create_error")
// The domain is being renewed.
DomainStatusRenewing = DomainStatus("renewing")
// An error occurred during the domain's renewal process.
DomainStatusRenewError = DomainStatus("renew_error")
// The domain is being transferred to Scaleway Domains and DNS.
DomainStatusXfering = DomainStatus("xfering")
// An error occurred during the domain's transfer process.
DomainStatusXferError = DomainStatus("xfer_error")
// The domain is expired but it can be renewed.
DomainStatusExpired = DomainStatus("expired")
// The domain is expiring but it is still renewable.
DomainStatusExpiring = DomainStatus("expiring")
// The domain's information is updating.
DomainStatusUpdating = DomainStatus("updating")
// The external domain has not yet been validated. It will be automatically removed after 48 hours if it still has not been validated by then.
DomainStatusChecking = DomainStatus("checking")
// The domain is locked. Contact Scaleway's support team for more information.
DomainStatusLocked = DomainStatus("locked")
// The domain will be deleted soon. This process cannot be canceled.
DomainStatusDeleting = DomainStatus("deleting")
)
func (enum DomainStatus) String() string {
if enum == "" {
// return default value if empty
return "status_unknown"
}
return string(enum)
}
func (enum DomainStatus) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *DomainStatus) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = DomainStatus(DomainStatus(tmp).String())
return nil
}
type HostStatus string
const (
// If unspecified, the status is unknown by default.
HostStatusUnknownStatus = HostStatus("unknown_status")
// The host is active.
HostStatusActive = HostStatus("active")
// The host is being updated.
HostStatusUpdating = HostStatus("updating")
// The host is being deleted.
HostStatusDeleting = HostStatus("deleting")
)
func (enum HostStatus) String() string {
if enum == "" {
// return default value if empty
return "unknown_status"
}
return string(enum)
}
func (enum HostStatus) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *HostStatus) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = HostStatus(HostStatus(tmp).String())
return nil
}
type LinkedProduct string
const (
// If unspecified, no Scaleway product uses the resources.
LinkedProductUnknownProduct = LinkedProduct("unknown_product")
// Resources are used by Scaleway VPC.
LinkedProductVpc = LinkedProduct("vpc")
)
func (enum LinkedProduct) String() string {
if enum == "" {
// return default value if empty
return "unknown_product"
}
return string(enum)
}
func (enum LinkedProduct) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *LinkedProduct) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = LinkedProduct(LinkedProduct(tmp).String())
return nil
}
type ListContactsRequestRole string
const (
ListContactsRequestRoleUnknownRole = ListContactsRequestRole("unknown_role")
// The contact is a domain's owner.
ListContactsRequestRoleOwner = ListContactsRequestRole("owner")
// The contact is a domain's administrative contact.
ListContactsRequestRoleAdministrative = ListContactsRequestRole("administrative")
// The contact is a domain's technical contact.
ListContactsRequestRoleTechnical = ListContactsRequestRole("technical")
)
func (enum ListContactsRequestRole) String() string {
if enum == "" {
// return default value if empty
return "unknown_role"
}
return string(enum)
}
func (enum ListContactsRequestRole) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *ListContactsRequestRole) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = ListContactsRequestRole(ListContactsRequestRole(tmp).String())
return nil
}
type ListDNSZoneRecordsRequestOrderBy string
const (
// Order by record name (ascending).
ListDNSZoneRecordsRequestOrderByNameAsc = ListDNSZoneRecordsRequestOrderBy("name_asc")
// Order by record name (descending).
ListDNSZoneRecordsRequestOrderByNameDesc = ListDNSZoneRecordsRequestOrderBy("name_desc")
)
func (enum ListDNSZoneRecordsRequestOrderBy) String() string {
if enum == "" {
// return default value if empty
return "name_asc"
}
return string(enum)
}
func (enum ListDNSZoneRecordsRequestOrderBy) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *ListDNSZoneRecordsRequestOrderBy) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = ListDNSZoneRecordsRequestOrderBy(ListDNSZoneRecordsRequestOrderBy(tmp).String())
return nil
}
type ListDNSZonesRequestOrderBy string
const (
// Order by domain name (ascending).
ListDNSZonesRequestOrderByDomainAsc = ListDNSZonesRequestOrderBy("domain_asc")
// Order by domain name (descending).
ListDNSZonesRequestOrderByDomainDesc = ListDNSZonesRequestOrderBy("domain_desc")
// Order by subdomain name (ascending).
ListDNSZonesRequestOrderBySubdomainAsc = ListDNSZonesRequestOrderBy("subdomain_asc")
// Order by subdomain name (descending).
ListDNSZonesRequestOrderBySubdomainDesc = ListDNSZonesRequestOrderBy("subdomain_desc")
// Order by created date (ascending).
ListDNSZonesRequestOrderByCreatedAtAsc = ListDNSZonesRequestOrderBy("created_at_asc")
// Order by created date (descending).
ListDNSZonesRequestOrderByCreatedAtDesc = ListDNSZonesRequestOrderBy("created_at_desc")
// Order by updated date (ascending).
ListDNSZonesRequestOrderByUpdatedAtAsc = ListDNSZonesRequestOrderBy("updated_at_asc")
// Order by updated date (descending).
ListDNSZonesRequestOrderByUpdatedAtDesc = ListDNSZonesRequestOrderBy("updated_at_desc")
)
func (enum ListDNSZonesRequestOrderBy) String() string {
if enum == "" {
// return default value if empty
return "domain_asc"
}
return string(enum)
}
func (enum ListDNSZonesRequestOrderBy) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *ListDNSZonesRequestOrderBy) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = ListDNSZonesRequestOrderBy(ListDNSZonesRequestOrderBy(tmp).String())
return nil
}
type ListDomainsRequestOrderBy string
const (
// Order by domain name (ascending).
ListDomainsRequestOrderByDomainAsc = ListDomainsRequestOrderBy("domain_asc")
// Order by domain name (descending).
ListDomainsRequestOrderByDomainDesc = ListDomainsRequestOrderBy("domain_desc")
)
func (enum ListDomainsRequestOrderBy) String() string {
if enum == "" {
// return default value if empty
return "domain_asc"
}
return string(enum)
}
func (enum ListDomainsRequestOrderBy) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *ListDomainsRequestOrderBy) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = ListDomainsRequestOrderBy(ListDomainsRequestOrderBy(tmp).String())
return nil
}
type ListRenewableDomainsRequestOrderBy string
const (
// Order by domain name (ascending).
ListRenewableDomainsRequestOrderByDomainAsc = ListRenewableDomainsRequestOrderBy("domain_asc")
// Order by domain name (descending).
ListRenewableDomainsRequestOrderByDomainDesc = ListRenewableDomainsRequestOrderBy("domain_desc")
)
func (enum ListRenewableDomainsRequestOrderBy) String() string {
if enum == "" {
// return default value if empty
return "domain_asc"
}
return string(enum)
}
func (enum ListRenewableDomainsRequestOrderBy) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *ListRenewableDomainsRequestOrderBy) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = ListRenewableDomainsRequestOrderBy(ListRenewableDomainsRequestOrderBy(tmp).String())
return nil
}
type ListTasksRequestOrderBy string
const (
// Order by domain name (descending).
ListTasksRequestOrderByDomainDesc = ListTasksRequestOrderBy("domain_desc")
// Order by domain name (ascending).
ListTasksRequestOrderByDomainAsc = ListTasksRequestOrderBy("domain_asc")
// Order by type (ascending).
ListTasksRequestOrderByTypeAsc = ListTasksRequestOrderBy("type_asc")
// Order by type (descending).
ListTasksRequestOrderByTypeDesc = ListTasksRequestOrderBy("type_desc")
// Order by status (ascending).
ListTasksRequestOrderByStatusAsc = ListTasksRequestOrderBy("status_asc")
// Order by status (descending).
ListTasksRequestOrderByStatusDesc = ListTasksRequestOrderBy("status_desc")
// Order by updated date (ascending).
ListTasksRequestOrderByUpdatedAtAsc = ListTasksRequestOrderBy("updated_at_asc")
// Order by updated date (descending).
ListTasksRequestOrderByUpdatedAtDesc = ListTasksRequestOrderBy("updated_at_desc")
)
func (enum ListTasksRequestOrderBy) String() string {
if enum == "" {
// return default value if empty
return "domain_desc"
}
return string(enum)
}
func (enum ListTasksRequestOrderBy) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *ListTasksRequestOrderBy) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = ListTasksRequestOrderBy(ListTasksRequestOrderBy(tmp).String())
return nil
}
type ListTldsRequestOrderBy string
const (
// Order by TLD name (ascending).
ListTldsRequestOrderByNameAsc = ListTldsRequestOrderBy("name_asc")
// Order by TLD name (descending).
ListTldsRequestOrderByNameDesc = ListTldsRequestOrderBy("name_desc")
)
func (enum ListTldsRequestOrderBy) String() string {
if enum == "" {
// return default value if empty
return "name_asc"
}
return string(enum)
}
func (enum ListTldsRequestOrderBy) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *ListTldsRequestOrderBy) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = ListTldsRequestOrderBy(ListTldsRequestOrderBy(tmp).String())
return nil
}
type RawFormat string
const (
// If unspecified, the format is unknown by default.
RawFormatUnknownRawFormat = RawFormat("unknown_raw_format")
// Export the DNS zone in text bind format.
RawFormatBind = RawFormat("bind")
)
func (enum RawFormat) String() string {
if enum == "" {
// return default value if empty
return "unknown_raw_format"
}
return string(enum)
}
func (enum RawFormat) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *RawFormat) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = RawFormat(RawFormat(tmp).String())
return nil
}
type RecordHTTPServiceConfigStrategy string
const (
// Returns a random IP based of the list of IPs available.
RecordHTTPServiceConfigStrategyRandom = RecordHTTPServiceConfigStrategy("random")
// Based on the hash of bestwho, returns a random functioning IP out of the best IPs available.
RecordHTTPServiceConfigStrategyHashed = RecordHTTPServiceConfigStrategy("hashed")
// Return all functioning IPs available.
RecordHTTPServiceConfigStrategyAll = RecordHTTPServiceConfigStrategy("all")
)
func (enum RecordHTTPServiceConfigStrategy) String() string {
if enum == "" {
// return default value if empty
return "random"
}
return string(enum)
}
func (enum RecordHTTPServiceConfigStrategy) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *RecordHTTPServiceConfigStrategy) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = RecordHTTPServiceConfigStrategy(RecordHTTPServiceConfigStrategy(tmp).String())
return nil
}
type RecordType string
const (
// If unspecified, the record's type is unknown by default.
RecordTypeUnknown = RecordType("unknown")
// An A record contains an IP address. Example: '203.0.113.210'.
RecordTypeA = RecordType("A")
// An AAAA record contains an IPv6 address. Example: '2001:DB8:2000:bf0::1'.
RecordTypeAAAA = RecordType("AAAA")
// A CNAME record specifies the canonical name of a record. Example 'webserver-01.yourcompany.com'.
RecordTypeCNAME = RecordType("CNAME")
// A TXT record can be used to attach textual data to a domain. Example 'v=spf1 include:_spf.tem.scw.cloud -all'.
RecordTypeTXT = RecordType("TXT")
// SRV records can be used to encode the location and port of services on a domain name. Example : '20 443 sipdir.scaleway.example.com'.
RecordTypeSRV = RecordType("SRV")
// TLSA records are used to bind SSL/TLS certificates to named hosts and ports.
RecordTypeTLSA = RecordType("TLSA")
// An MX record specifies a mail exchanger host for a domain. Example '10 mx.example.net.'.
RecordTypeMX = RecordType("MX")
// Specifies nameservers for a domain. Example: 'ns1.yourcompany.com'.
RecordTypeNS = RecordType("NS")
// A reverse pointer is used to specify the hostname that belongs to an IP or an IPv6 address. Example: 'www.yourcompany.com.'.
RecordTypePTR = RecordType("PTR")
// A 'Certification Authority Authorization' record is used to specify certificate authorities that may issue certificates for a domain. Example: '0 issue ca.yourcompany.com'.
RecordTypeCAA = RecordType("CAA")
// The ALIAS pseudo-record type is supported to provide CNAME-like mechanisms on a zone's apex.
RecordTypeALIAS = RecordType("ALIAS")
// A LOC record is a way of expressing geographic location information for a domain name. It contains WGS84 latitude, longitude and altitude. Example: '51 56 0.123 N 5 54 0.000 E 4.00m 1.00m 10000.00m 10.00m'.
RecordTypeLOC = RecordType("LOC")
// An SSHFP record type is used for storing Secure Shell (SSH) fingerprints. Example: '2 1 123456789abcdef67890123456789abcdef67890'.
RecordTypeSSHFP = RecordType("SSHFP")
// A Hardware Info record is used to specify the CPU and operating system you are using. Example: 'i386 Linux'.
RecordTypeHINFO = RecordType("HINFO")
// A Responsible Person record stores the mailbox name and the more-information pointer. Example: 'michel.yourcompany.com michel.people.yourcompany.com', to indicate that michel@yourcompany.com is responsible and that more information about Michel is available by querying the `TXT` record of 'michel.people.yourcompany.com'.
RecordTypeRP = RecordType("RP")
// A URI record, is used to publish mappings from hostnames to URIs. Example: '10 1 'ftp://ftp.yourcompany.com/public'.
RecordTypeURI = RecordType("URI")
// DS records (Delegation Signer) are used to secure delegations (DNSSEC). Example: '2371 13 2 1F987CC6583E92DF0890718C42'.
RecordTypeDS = RecordType("DS")
// A Naming Authority Pointer record is used to set rules for how websites process requests. Example: '100 50 "s" "z3950+I2L+I2C" "" _z3950._tcp.yourcompany.com'.
RecordTypeNAPTR = RecordType("NAPTR")
// A DNAME record provides redirection from one part of the DNS name tree to another part of the DNS name tree. DNAME and CNAME records both cause a lookup to (potentially) return data corresponding to a different domain name from the queried domain name. Example: 'yourcompany.com'.
RecordTypeDNAME = RecordType("DNAME")
)
func (enum RecordType) String() string {
if enum == "" {
// return default value if empty
return "unknown"
}
return string(enum)
}
func (enum RecordType) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}
func (enum *RecordType) UnmarshalJSON(data []byte) error {
tmp := ""
if err := json.Unmarshal(data, &tmp); err != nil {
return err
}
*enum = RecordType(RecordType(tmp).String())
return nil
}
type RenewableDomainStatus string
const (
// If unspecified, the status is unknown by default.
RenewableDomainStatusUnknown = RenewableDomainStatus("unknown")
// The domain can be renewed.
RenewableDomainStatusRenewable = RenewableDomainStatus("renewable")
// The domain is expired, but it still can be late renewed.
RenewableDomainStatusLateReneweable = RenewableDomainStatus("late_reneweable")
// The domain cannot be renewed.
RenewableDomainStatusNotRenewable = RenewableDomainStatus("not_renewable")
)
func (enum RenewableDomainStatus) String() string {
if enum == "" {
// return default value if empty
return "unknown"
}
return string(enum)
}
func (enum RenewableDomainStatus) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil