-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_country_codes.go
607 lines (585 loc) · 10.5 KB
/
model_country_codes.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
/*
Onfido API v3.6
The Onfido API (v3.6)
API version: v3.6
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
"fmt"
)
// CountryCodes the model 'CountryCodes'
type CountryCodes string
// List of country_codes
const (
ABW CountryCodes = "ABW"
AFG CountryCodes = "AFG"
AGO CountryCodes = "AGO"
AIA CountryCodes = "AIA"
ALA CountryCodes = "ALA"
ALB CountryCodes = "ALB"
AND CountryCodes = "AND"
ARE CountryCodes = "ARE"
ARG CountryCodes = "ARG"
ARM CountryCodes = "ARM"
ASM CountryCodes = "ASM"
ATA CountryCodes = "ATA"
ATF CountryCodes = "ATF"
ATG CountryCodes = "ATG"
AUS CountryCodes = "AUS"
AUT CountryCodes = "AUT"
AZE CountryCodes = "AZE"
BDI CountryCodes = "BDI"
BEL CountryCodes = "BEL"
BEN CountryCodes = "BEN"
BES CountryCodes = "BES"
BFA CountryCodes = "BFA"
BGD CountryCodes = "BGD"
BGR CountryCodes = "BGR"
BHR CountryCodes = "BHR"
BHS CountryCodes = "BHS"
BIH CountryCodes = "BIH"
BLM CountryCodes = "BLM"
BLR CountryCodes = "BLR"
BLZ CountryCodes = "BLZ"
BMU CountryCodes = "BMU"
BOL CountryCodes = "BOL"
BRA CountryCodes = "BRA"
BRB CountryCodes = "BRB"
BRN CountryCodes = "BRN"
BTN CountryCodes = "BTN"
BVT CountryCodes = "BVT"
BWA CountryCodes = "BWA"
CAF CountryCodes = "CAF"
CAN CountryCodes = "CAN"
CCK CountryCodes = "CCK"
CHE CountryCodes = "CHE"
CHL CountryCodes = "CHL"
CHN CountryCodes = "CHN"
CIV CountryCodes = "CIV"
CMR CountryCodes = "CMR"
COD CountryCodes = "COD"
COG CountryCodes = "COG"
COK CountryCodes = "COK"
COL CountryCodes = "COL"
COM CountryCodes = "COM"
CPV CountryCodes = "CPV"
CRI CountryCodes = "CRI"
CUB CountryCodes = "CUB"
CUW CountryCodes = "CUW"
CXR CountryCodes = "CXR"
CYM CountryCodes = "CYM"
CYP CountryCodes = "CYP"
CZE CountryCodes = "CZE"
DEU CountryCodes = "DEU"
DJI CountryCodes = "DJI"
DMA CountryCodes = "DMA"
DNK CountryCodes = "DNK"
DOM CountryCodes = "DOM"
DZA CountryCodes = "DZA"
ECU CountryCodes = "ECU"
EGY CountryCodes = "EGY"
ERI CountryCodes = "ERI"
ESH CountryCodes = "ESH"
ESP CountryCodes = "ESP"
EST CountryCodes = "EST"
ETH CountryCodes = "ETH"
FIN CountryCodes = "FIN"
FJI CountryCodes = "FJI"
FLK CountryCodes = "FLK"
FRA CountryCodes = "FRA"
FRO CountryCodes = "FRO"
FSM CountryCodes = "FSM"
GAB CountryCodes = "GAB"
GBR CountryCodes = "GBR"
GEO CountryCodes = "GEO"
GGY CountryCodes = "GGY"
GHA CountryCodes = "GHA"
GIB CountryCodes = "GIB"
GIN CountryCodes = "GIN"
GLP CountryCodes = "GLP"
GMB CountryCodes = "GMB"
GNB CountryCodes = "GNB"
GNQ CountryCodes = "GNQ"
GRC CountryCodes = "GRC"
GRD CountryCodes = "GRD"
GRL CountryCodes = "GRL"
GTM CountryCodes = "GTM"
GUF CountryCodes = "GUF"
GUM CountryCodes = "GUM"
GUY CountryCodes = "GUY"
HKG CountryCodes = "HKG"
HMD CountryCodes = "HMD"
HND CountryCodes = "HND"
HRV CountryCodes = "HRV"
HTI CountryCodes = "HTI"
HUN CountryCodes = "HUN"
IDN CountryCodes = "IDN"
IMN CountryCodes = "IMN"
IND CountryCodes = "IND"
IOT CountryCodes = "IOT"
IRL CountryCodes = "IRL"
IRN CountryCodes = "IRN"
IRQ CountryCodes = "IRQ"
ISL CountryCodes = "ISL"
ISR CountryCodes = "ISR"
ITA CountryCodes = "ITA"
JAM CountryCodes = "JAM"
JEY CountryCodes = "JEY"
JOR CountryCodes = "JOR"
JPN CountryCodes = "JPN"
KAZ CountryCodes = "KAZ"
KEN CountryCodes = "KEN"
KGZ CountryCodes = "KGZ"
KHM CountryCodes = "KHM"
KIR CountryCodes = "KIR"
KNA CountryCodes = "KNA"
KOR CountryCodes = "KOR"
KWT CountryCodes = "KWT"
LAO CountryCodes = "LAO"
LBN CountryCodes = "LBN"
LBR CountryCodes = "LBR"
LBY CountryCodes = "LBY"
LCA CountryCodes = "LCA"
LIE CountryCodes = "LIE"
LKA CountryCodes = "LKA"
LSO CountryCodes = "LSO"
LTU CountryCodes = "LTU"
LUX CountryCodes = "LUX"
LVA CountryCodes = "LVA"
MAC CountryCodes = "MAC"
MAF CountryCodes = "MAF"
MAR CountryCodes = "MAR"
MCO CountryCodes = "MCO"
MDA CountryCodes = "MDA"
MDG CountryCodes = "MDG"
MDV CountryCodes = "MDV"
MEX CountryCodes = "MEX"
MHL CountryCodes = "MHL"
MKD CountryCodes = "MKD"
MLI CountryCodes = "MLI"
MLT CountryCodes = "MLT"
MMR CountryCodes = "MMR"
MNE CountryCodes = "MNE"
MNG CountryCodes = "MNG"
MNP CountryCodes = "MNP"
MOZ CountryCodes = "MOZ"
MRT CountryCodes = "MRT"
MSR CountryCodes = "MSR"
MTQ CountryCodes = "MTQ"
MUS CountryCodes = "MUS"
MWI CountryCodes = "MWI"
MYS CountryCodes = "MYS"
MYT CountryCodes = "MYT"
NAM CountryCodes = "NAM"
NCL CountryCodes = "NCL"
NER CountryCodes = "NER"
NFK CountryCodes = "NFK"
NGA CountryCodes = "NGA"
NIC CountryCodes = "NIC"
NIU CountryCodes = "NIU"
NLD CountryCodes = "NLD"
NOR CountryCodes = "NOR"
NPL CountryCodes = "NPL"
NRU CountryCodes = "NRU"
NZL CountryCodes = "NZL"
OMN CountryCodes = "OMN"
PAK CountryCodes = "PAK"
PAN CountryCodes = "PAN"
PCN CountryCodes = "PCN"
PER CountryCodes = "PER"
PHL CountryCodes = "PHL"
PLW CountryCodes = "PLW"
PNG CountryCodes = "PNG"
POL CountryCodes = "POL"
PRI CountryCodes = "PRI"
PRK CountryCodes = "PRK"
PRT CountryCodes = "PRT"
PRY CountryCodes = "PRY"
PSE CountryCodes = "PSE"
PYF CountryCodes = "PYF"
QAT CountryCodes = "QAT"
REU CountryCodes = "REU"
RKS CountryCodes = "RKS"
ROU CountryCodes = "ROU"
RUS CountryCodes = "RUS"
RWA CountryCodes = "RWA"
SAU CountryCodes = "SAU"
SDN CountryCodes = "SDN"
SEN CountryCodes = "SEN"
SGP CountryCodes = "SGP"
SGS CountryCodes = "SGS"
SHN CountryCodes = "SHN"
SJM CountryCodes = "SJM"
SLB CountryCodes = "SLB"
SLE CountryCodes = "SLE"
SLV CountryCodes = "SLV"
SMR CountryCodes = "SMR"
SOM CountryCodes = "SOM"
SPM CountryCodes = "SPM"
SRB CountryCodes = "SRB"
SSD CountryCodes = "SSD"
STP CountryCodes = "STP"
SUR CountryCodes = "SUR"
SVK CountryCodes = "SVK"
SVN CountryCodes = "SVN"
SWE CountryCodes = "SWE"
SWZ CountryCodes = "SWZ"
SXM CountryCodes = "SXM"
SYC CountryCodes = "SYC"
SYR CountryCodes = "SYR"
TCA CountryCodes = "TCA"
TCD CountryCodes = "TCD"
TGO CountryCodes = "TGO"
THA CountryCodes = "THA"
TJK CountryCodes = "TJK"
TKL CountryCodes = "TKL"
TKM CountryCodes = "TKM"
TLS CountryCodes = "TLS"
TON CountryCodes = "TON"
TTO CountryCodes = "TTO"
TUN CountryCodes = "TUN"
TUR CountryCodes = "TUR"
TUV CountryCodes = "TUV"
TWN CountryCodes = "TWN"
TZA CountryCodes = "TZA"
UGA CountryCodes = "UGA"
UKR CountryCodes = "UKR"
UMI CountryCodes = "UMI"
URY CountryCodes = "URY"
USA CountryCodes = "USA"
UZB CountryCodes = "UZB"
VAT CountryCodes = "VAT"
VCT CountryCodes = "VCT"
VEN CountryCodes = "VEN"
VGB CountryCodes = "VGB"
VIR CountryCodes = "VIR"
VNM CountryCodes = "VNM"
VUT CountryCodes = "VUT"
WLF CountryCodes = "WLF"
WSM CountryCodes = "WSM"
YEM CountryCodes = "YEM"
ZAF CountryCodes = "ZAF"
ZMB CountryCodes = "ZMB"
ZWE CountryCodes = "ZWE"
)
// All allowed values of CountryCodes enum
var AllowedCountryCodesEnumValues = []CountryCodes{
"ABW",
"AFG",
"AGO",
"AIA",
"ALA",
"ALB",
"AND",
"ARE",
"ARG",
"ARM",
"ASM",
"ATA",
"ATF",
"ATG",
"AUS",
"AUT",
"AZE",
"BDI",
"BEL",
"BEN",
"BES",
"BFA",
"BGD",
"BGR",
"BHR",
"BHS",
"BIH",
"BLM",
"BLR",
"BLZ",
"BMU",
"BOL",
"BRA",
"BRB",
"BRN",
"BTN",
"BVT",
"BWA",
"CAF",
"CAN",
"CCK",
"CHE",
"CHL",
"CHN",
"CIV",
"CMR",
"COD",
"COG",
"COK",
"COL",
"COM",
"CPV",
"CRI",
"CUB",
"CUW",
"CXR",
"CYM",
"CYP",
"CZE",
"DEU",
"DJI",
"DMA",
"DNK",
"DOM",
"DZA",
"ECU",
"EGY",
"ERI",
"ESH",
"ESP",
"EST",
"ETH",
"FIN",
"FJI",
"FLK",
"FRA",
"FRO",
"FSM",
"GAB",
"GBR",
"GEO",
"GGY",
"GHA",
"GIB",
"GIN",
"GLP",
"GMB",
"GNB",
"GNQ",
"GRC",
"GRD",
"GRL",
"GTM",
"GUF",
"GUM",
"GUY",
"HKG",
"HMD",
"HND",
"HRV",
"HTI",
"HUN",
"IDN",
"IMN",
"IND",
"IOT",
"IRL",
"IRN",
"IRQ",
"ISL",
"ISR",
"ITA",
"JAM",
"JEY",
"JOR",
"JPN",
"KAZ",
"KEN",
"KGZ",
"KHM",
"KIR",
"KNA",
"KOR",
"KWT",
"LAO",
"LBN",
"LBR",
"LBY",
"LCA",
"LIE",
"LKA",
"LSO",
"LTU",
"LUX",
"LVA",
"MAC",
"MAF",
"MAR",
"MCO",
"MDA",
"MDG",
"MDV",
"MEX",
"MHL",
"MKD",
"MLI",
"MLT",
"MMR",
"MNE",
"MNG",
"MNP",
"MOZ",
"MRT",
"MSR",
"MTQ",
"MUS",
"MWI",
"MYS",
"MYT",
"NAM",
"NCL",
"NER",
"NFK",
"NGA",
"NIC",
"NIU",
"NLD",
"NOR",
"NPL",
"NRU",
"NZL",
"OMN",
"PAK",
"PAN",
"PCN",
"PER",
"PHL",
"PLW",
"PNG",
"POL",
"PRI",
"PRK",
"PRT",
"PRY",
"PSE",
"PYF",
"QAT",
"REU",
"RKS",
"ROU",
"RUS",
"RWA",
"SAU",
"SDN",
"SEN",
"SGP",
"SGS",
"SHN",
"SJM",
"SLB",
"SLE",
"SLV",
"SMR",
"SOM",
"SPM",
"SRB",
"SSD",
"STP",
"SUR",
"SVK",
"SVN",
"SWE",
"SWZ",
"SXM",
"SYC",
"SYR",
"TCA",
"TCD",
"TGO",
"THA",
"TJK",
"TKL",
"TKM",
"TLS",
"TON",
"TTO",
"TUN",
"TUR",
"TUV",
"TWN",
"TZA",
"UGA",
"UKR",
"UMI",
"URY",
"USA",
"UZB",
"VAT",
"VCT",
"VEN",
"VGB",
"VIR",
"VNM",
"VUT",
"WLF",
"WSM",
"YEM",
"ZAF",
"ZMB",
"ZWE",
}
func (v *CountryCodes) UnmarshalJSON(src []byte) error {
var value string
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
enumTypeValue := CountryCodes(value)
for _, existing := range AllowedCountryCodesEnumValues {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
return fmt.Errorf("%+v is not a valid CountryCodes", value)
}
// NewCountryCodesFromValue returns a pointer to a valid CountryCodes
// for the value passed as argument, or an error if the value passed is not allowed by the enum
func NewCountryCodesFromValue(v string) (*CountryCodes, error) {
ev := CountryCodes(v)
if ev.IsValid() {
return &ev, nil
} else {
return nil, fmt.Errorf("invalid value '%v' for CountryCodes: valid values are %v", v, AllowedCountryCodesEnumValues)
}
}
// IsValid return true if the value is valid for the enum, false otherwise
func (v CountryCodes) IsValid() bool {
for _, existing := range AllowedCountryCodesEnumValues {
if existing == v {
return true
}
}
return false
}
// Ptr returns reference to country_codes value
func (v CountryCodes) Ptr() *CountryCodes {
return &v
}
type NullableCountryCodes struct {
value *CountryCodes
isSet bool
}
func (v NullableCountryCodes) Get() *CountryCodes {
return v.value
}
func (v *NullableCountryCodes) Set(val *CountryCodes) {
v.value = val
v.isSet = true
}
func (v NullableCountryCodes) IsSet() bool {
return v.isSet
}
func (v *NullableCountryCodes) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCountryCodes(val *CountryCodes) *NullableCountryCodes {
return &NullableCountryCodes{value: val, isSet: true}
}
func (v NullableCountryCodes) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCountryCodes) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}