std_sdk.go raw

   1  // This file was automatically generated. DO NOT EDIT.
   2  // If you have any remark or suggestion do not hesitate to open an issue.
   3  
   4  // Package std provides methods and message types of the std  API.
   5  package std
   6  
   7  import (
   8  	"bytes"
   9  	"encoding/json"
  10  	"fmt"
  11  	"net"
  12  	"net/http"
  13  	"net/url"
  14  	"strings"
  15  	"time"
  16  
  17  	"github.com/scaleway/scaleway-sdk-go/marshaler"
  18  	"github.com/scaleway/scaleway-sdk-go/namegenerator"
  19  	"github.com/scaleway/scaleway-sdk-go/parameter"
  20  	"github.com/scaleway/scaleway-sdk-go/scw"
  21  )
  22  
  23  // always import dependencies
  24  var (
  25  	_ fmt.Stringer
  26  	_ json.Unmarshaler
  27  	_ url.URL
  28  	_ net.IP
  29  	_ http.Header
  30  	_ bytes.Reader
  31  	_ time.Time
  32  	_ = strings.Join
  33  
  34  	_ scw.ScalewayRequest
  35  	_ marshaler.Duration
  36  	_ scw.File
  37  	_ = parameter.AddToQuery
  38  	_ = namegenerator.GetRandomName
  39  )
  40  
  41  type CountryCode string
  42  
  43  const (
  44  	CountryCodeUnknownCountryCode = CountryCode("unknown_country_code")
  45  	CountryCodeAF                 = CountryCode("AF")
  46  	CountryCodeAX                 = CountryCode("AX")
  47  	CountryCodeAL                 = CountryCode("AL")
  48  	CountryCodeDZ                 = CountryCode("DZ")
  49  	CountryCodeAS                 = CountryCode("AS")
  50  	CountryCodeAD                 = CountryCode("AD")
  51  	CountryCodeAO                 = CountryCode("AO")
  52  	CountryCodeAI                 = CountryCode("AI")
  53  	CountryCodeAQ                 = CountryCode("AQ")
  54  	CountryCodeAG                 = CountryCode("AG")
  55  	CountryCodeAR                 = CountryCode("AR")
  56  	CountryCodeAM                 = CountryCode("AM")
  57  	CountryCodeAW                 = CountryCode("AW")
  58  	CountryCodeAU                 = CountryCode("AU")
  59  	CountryCodeAT                 = CountryCode("AT")
  60  	CountryCodeAZ                 = CountryCode("AZ")
  61  	CountryCodeBS                 = CountryCode("BS")
  62  	CountryCodeBH                 = CountryCode("BH")
  63  	CountryCodeBD                 = CountryCode("BD")
  64  	CountryCodeBB                 = CountryCode("BB")
  65  	CountryCodeBY                 = CountryCode("BY")
  66  	CountryCodeBE                 = CountryCode("BE")
  67  	CountryCodeBZ                 = CountryCode("BZ")
  68  	CountryCodeBJ                 = CountryCode("BJ")
  69  	CountryCodeBM                 = CountryCode("BM")
  70  	CountryCodeBT                 = CountryCode("BT")
  71  	CountryCodeBO                 = CountryCode("BO")
  72  	CountryCodeBQ                 = CountryCode("BQ")
  73  	CountryCodeBA                 = CountryCode("BA")
  74  	CountryCodeBW                 = CountryCode("BW")
  75  	CountryCodeBV                 = CountryCode("BV")
  76  	CountryCodeBR                 = CountryCode("BR")
  77  	CountryCodeIO                 = CountryCode("IO")
  78  	CountryCodeBN                 = CountryCode("BN")
  79  	CountryCodeBG                 = CountryCode("BG")
  80  	CountryCodeBF                 = CountryCode("BF")
  81  	CountryCodeBI                 = CountryCode("BI")
  82  	CountryCodeKH                 = CountryCode("KH")
  83  	CountryCodeCM                 = CountryCode("CM")
  84  	CountryCodeCA                 = CountryCode("CA")
  85  	CountryCodeCV                 = CountryCode("CV")
  86  	CountryCodeKY                 = CountryCode("KY")
  87  	CountryCodeCF                 = CountryCode("CF")
  88  	CountryCodeTD                 = CountryCode("TD")
  89  	CountryCodeCL                 = CountryCode("CL")
  90  	CountryCodeCN                 = CountryCode("CN")
  91  	CountryCodeCX                 = CountryCode("CX")
  92  	CountryCodeCC                 = CountryCode("CC")
  93  	CountryCodeCO                 = CountryCode("CO")
  94  	CountryCodeKM                 = CountryCode("KM")
  95  	CountryCodeCG                 = CountryCode("CG")
  96  	CountryCodeCD                 = CountryCode("CD")
  97  	CountryCodeCK                 = CountryCode("CK")
  98  	CountryCodeCR                 = CountryCode("CR")
  99  	CountryCodeCI                 = CountryCode("CI")
 100  	CountryCodeHR                 = CountryCode("HR")
 101  	CountryCodeCU                 = CountryCode("CU")
 102  	CountryCodeCW                 = CountryCode("CW")
 103  	CountryCodeCY                 = CountryCode("CY")
 104  	CountryCodeCZ                 = CountryCode("CZ")
 105  	CountryCodeDK                 = CountryCode("DK")
 106  	CountryCodeDJ                 = CountryCode("DJ")
 107  	CountryCodeDM                 = CountryCode("DM")
 108  	CountryCodeDO                 = CountryCode("DO")
 109  	CountryCodeEC                 = CountryCode("EC")
 110  	CountryCodeEG                 = CountryCode("EG")
 111  	CountryCodeSV                 = CountryCode("SV")
 112  	CountryCodeGQ                 = CountryCode("GQ")
 113  	CountryCodeER                 = CountryCode("ER")
 114  	CountryCodeEE                 = CountryCode("EE")
 115  	CountryCodeET                 = CountryCode("ET")
 116  	CountryCodeFK                 = CountryCode("FK")
 117  	CountryCodeFO                 = CountryCode("FO")
 118  	CountryCodeFJ                 = CountryCode("FJ")
 119  	CountryCodeFI                 = CountryCode("FI")
 120  	CountryCodeFR                 = CountryCode("FR")
 121  	CountryCodeGF                 = CountryCode("GF")
 122  	CountryCodePF                 = CountryCode("PF")
 123  	CountryCodeTF                 = CountryCode("TF")
 124  	CountryCodeGA                 = CountryCode("GA")
 125  	CountryCodeGM                 = CountryCode("GM")
 126  	CountryCodeGE                 = CountryCode("GE")
 127  	CountryCodeDE                 = CountryCode("DE")
 128  	CountryCodeGH                 = CountryCode("GH")
 129  	CountryCodeGI                 = CountryCode("GI")
 130  	CountryCodeGR                 = CountryCode("GR")
 131  	CountryCodeGL                 = CountryCode("GL")
 132  	CountryCodeGD                 = CountryCode("GD")
 133  	CountryCodeGP                 = CountryCode("GP")
 134  	CountryCodeGU                 = CountryCode("GU")
 135  	CountryCodeGT                 = CountryCode("GT")
 136  	CountryCodeGG                 = CountryCode("GG")
 137  	CountryCodeGN                 = CountryCode("GN")
 138  	CountryCodeGW                 = CountryCode("GW")
 139  	CountryCodeGY                 = CountryCode("GY")
 140  	CountryCodeHT                 = CountryCode("HT")
 141  	CountryCodeHM                 = CountryCode("HM")
 142  	CountryCodeVA                 = CountryCode("VA")
 143  	CountryCodeHN                 = CountryCode("HN")
 144  	CountryCodeHK                 = CountryCode("HK")
 145  	CountryCodeHU                 = CountryCode("HU")
 146  	CountryCodeIS                 = CountryCode("IS")
 147  	CountryCodeIN                 = CountryCode("IN")
 148  	CountryCodeID                 = CountryCode("ID")
 149  	CountryCodeIR                 = CountryCode("IR")
 150  	CountryCodeIQ                 = CountryCode("IQ")
 151  	CountryCodeIE                 = CountryCode("IE")
 152  	CountryCodeIM                 = CountryCode("IM")
 153  	CountryCodeIL                 = CountryCode("IL")
 154  	CountryCodeIT                 = CountryCode("IT")
 155  	CountryCodeJM                 = CountryCode("JM")
 156  	CountryCodeJP                 = CountryCode("JP")
 157  	CountryCodeJE                 = CountryCode("JE")
 158  	CountryCodeJO                 = CountryCode("JO")
 159  	CountryCodeKZ                 = CountryCode("KZ")
 160  	CountryCodeKE                 = CountryCode("KE")
 161  	CountryCodeKI                 = CountryCode("KI")
 162  	CountryCodeKP                 = CountryCode("KP")
 163  	CountryCodeKR                 = CountryCode("KR")
 164  	CountryCodeKW                 = CountryCode("KW")
 165  	CountryCodeKG                 = CountryCode("KG")
 166  	CountryCodeLA                 = CountryCode("LA")
 167  	CountryCodeLV                 = CountryCode("LV")
 168  	CountryCodeLB                 = CountryCode("LB")
 169  	CountryCodeLS                 = CountryCode("LS")
 170  	CountryCodeLR                 = CountryCode("LR")
 171  	CountryCodeLY                 = CountryCode("LY")
 172  	CountryCodeLI                 = CountryCode("LI")
 173  	CountryCodeLT                 = CountryCode("LT")
 174  	CountryCodeLU                 = CountryCode("LU")
 175  	CountryCodeMO                 = CountryCode("MO")
 176  	CountryCodeMK                 = CountryCode("MK")
 177  	CountryCodeMG                 = CountryCode("MG")
 178  	CountryCodeMW                 = CountryCode("MW")
 179  	CountryCodeMY                 = CountryCode("MY")
 180  	CountryCodeMV                 = CountryCode("MV")
 181  	CountryCodeML                 = CountryCode("ML")
 182  	CountryCodeMT                 = CountryCode("MT")
 183  	CountryCodeMH                 = CountryCode("MH")
 184  	CountryCodeMQ                 = CountryCode("MQ")
 185  	CountryCodeMR                 = CountryCode("MR")
 186  	CountryCodeMU                 = CountryCode("MU")
 187  	CountryCodeYT                 = CountryCode("YT")
 188  	CountryCodeMX                 = CountryCode("MX")
 189  	CountryCodeFM                 = CountryCode("FM")
 190  	CountryCodeMD                 = CountryCode("MD")
 191  	CountryCodeMC                 = CountryCode("MC")
 192  	CountryCodeMN                 = CountryCode("MN")
 193  	CountryCodeME                 = CountryCode("ME")
 194  	CountryCodeMS                 = CountryCode("MS")
 195  	CountryCodeMA                 = CountryCode("MA")
 196  	CountryCodeMZ                 = CountryCode("MZ")
 197  	CountryCodeMM                 = CountryCode("MM")
 198  	CountryCodeNA                 = CountryCode("NA")
 199  	CountryCodeNR                 = CountryCode("NR")
 200  	CountryCodeNP                 = CountryCode("NP")
 201  	CountryCodeNL                 = CountryCode("NL")
 202  	CountryCodeNC                 = CountryCode("NC")
 203  	CountryCodeNZ                 = CountryCode("NZ")
 204  	CountryCodeNI                 = CountryCode("NI")
 205  	CountryCodeNE                 = CountryCode("NE")
 206  	CountryCodeNG                 = CountryCode("NG")
 207  	CountryCodeNU                 = CountryCode("NU")
 208  	CountryCodeNF                 = CountryCode("NF")
 209  	CountryCodeMP                 = CountryCode("MP")
 210  	CountryCodeNO                 = CountryCode("NO")
 211  	CountryCodeOM                 = CountryCode("OM")
 212  	CountryCodePK                 = CountryCode("PK")
 213  	CountryCodePW                 = CountryCode("PW")
 214  	CountryCodePS                 = CountryCode("PS")
 215  	CountryCodePA                 = CountryCode("PA")
 216  	CountryCodePG                 = CountryCode("PG")
 217  	CountryCodePY                 = CountryCode("PY")
 218  	CountryCodePE                 = CountryCode("PE")
 219  	CountryCodePH                 = CountryCode("PH")
 220  	CountryCodePN                 = CountryCode("PN")
 221  	CountryCodePL                 = CountryCode("PL")
 222  	CountryCodePT                 = CountryCode("PT")
 223  	CountryCodePR                 = CountryCode("PR")
 224  	CountryCodeQA                 = CountryCode("QA")
 225  	CountryCodeRE                 = CountryCode("RE")
 226  	CountryCodeRO                 = CountryCode("RO")
 227  	CountryCodeRU                 = CountryCode("RU")
 228  	CountryCodeRW                 = CountryCode("RW")
 229  	CountryCodeBL                 = CountryCode("BL")
 230  	CountryCodeSH                 = CountryCode("SH")
 231  	CountryCodeKN                 = CountryCode("KN")
 232  	CountryCodeLC                 = CountryCode("LC")
 233  	CountryCodeMF                 = CountryCode("MF")
 234  	CountryCodePM                 = CountryCode("PM")
 235  	CountryCodeVC                 = CountryCode("VC")
 236  	CountryCodeWS                 = CountryCode("WS")
 237  	CountryCodeSM                 = CountryCode("SM")
 238  	CountryCodeST                 = CountryCode("ST")
 239  	CountryCodeSA                 = CountryCode("SA")
 240  	CountryCodeSN                 = CountryCode("SN")
 241  	CountryCodeRS                 = CountryCode("RS")
 242  	CountryCodeSC                 = CountryCode("SC")
 243  	CountryCodeSL                 = CountryCode("SL")
 244  	CountryCodeSG                 = CountryCode("SG")
 245  	CountryCodeSX                 = CountryCode("SX")
 246  	CountryCodeSK                 = CountryCode("SK")
 247  	CountryCodeSI                 = CountryCode("SI")
 248  	CountryCodeSB                 = CountryCode("SB")
 249  	CountryCodeSO                 = CountryCode("SO")
 250  	CountryCodeZA                 = CountryCode("ZA")
 251  	CountryCodeGS                 = CountryCode("GS")
 252  	CountryCodeSS                 = CountryCode("SS")
 253  	CountryCodeES                 = CountryCode("ES")
 254  	CountryCodeLK                 = CountryCode("LK")
 255  	CountryCodeSD                 = CountryCode("SD")
 256  	CountryCodeSR                 = CountryCode("SR")
 257  	CountryCodeSJ                 = CountryCode("SJ")
 258  	CountryCodeSZ                 = CountryCode("SZ")
 259  	CountryCodeSE                 = CountryCode("SE")
 260  	CountryCodeCH                 = CountryCode("CH")
 261  	CountryCodeSY                 = CountryCode("SY")
 262  	CountryCodeTW                 = CountryCode("TW")
 263  	CountryCodeTJ                 = CountryCode("TJ")
 264  	CountryCodeTZ                 = CountryCode("TZ")
 265  	CountryCodeTH                 = CountryCode("TH")
 266  	CountryCodeTL                 = CountryCode("TL")
 267  	CountryCodeTG                 = CountryCode("TG")
 268  	CountryCodeTK                 = CountryCode("TK")
 269  	CountryCodeTO                 = CountryCode("TO")
 270  	CountryCodeTT                 = CountryCode("TT")
 271  	CountryCodeTN                 = CountryCode("TN")
 272  	CountryCodeTR                 = CountryCode("TR")
 273  	CountryCodeTM                 = CountryCode("TM")
 274  	CountryCodeTC                 = CountryCode("TC")
 275  	CountryCodeTV                 = CountryCode("TV")
 276  	CountryCodeUG                 = CountryCode("UG")
 277  	CountryCodeUA                 = CountryCode("UA")
 278  	CountryCodeAE                 = CountryCode("AE")
 279  	CountryCodeGB                 = CountryCode("GB")
 280  	CountryCodeUS                 = CountryCode("US")
 281  	CountryCodeUM                 = CountryCode("UM")
 282  	CountryCodeUY                 = CountryCode("UY")
 283  	CountryCodeUZ                 = CountryCode("UZ")
 284  	CountryCodeVU                 = CountryCode("VU")
 285  	CountryCodeVE                 = CountryCode("VE")
 286  	CountryCodeVN                 = CountryCode("VN")
 287  	CountryCodeVG                 = CountryCode("VG")
 288  	CountryCodeVI                 = CountryCode("VI")
 289  	CountryCodeWF                 = CountryCode("WF")
 290  	CountryCodeEH                 = CountryCode("EH")
 291  	CountryCodeYE                 = CountryCode("YE")
 292  	CountryCodeZM                 = CountryCode("ZM")
 293  	CountryCodeZW                 = CountryCode("ZW")
 294  )
 295  
 296  func (enum CountryCode) String() string {
 297  	if enum == "" {
 298  		// return default value if empty
 299  		return string(CountryCodeUnknownCountryCode)
 300  	}
 301  	return string(enum)
 302  }
 303  
 304  func (enum CountryCode) Values() []CountryCode {
 305  	return []CountryCode{
 306  		"unknown_country_code",
 307  		"AF",
 308  		"AX",
 309  		"AL",
 310  		"DZ",
 311  		"AS",
 312  		"AD",
 313  		"AO",
 314  		"AI",
 315  		"AQ",
 316  		"AG",
 317  		"AR",
 318  		"AM",
 319  		"AW",
 320  		"AU",
 321  		"AT",
 322  		"AZ",
 323  		"BS",
 324  		"BH",
 325  		"BD",
 326  		"BB",
 327  		"BY",
 328  		"BE",
 329  		"BZ",
 330  		"BJ",
 331  		"BM",
 332  		"BT",
 333  		"BO",
 334  		"BQ",
 335  		"BA",
 336  		"BW",
 337  		"BV",
 338  		"BR",
 339  		"IO",
 340  		"BN",
 341  		"BG",
 342  		"BF",
 343  		"BI",
 344  		"KH",
 345  		"CM",
 346  		"CA",
 347  		"CV",
 348  		"KY",
 349  		"CF",
 350  		"TD",
 351  		"CL",
 352  		"CN",
 353  		"CX",
 354  		"CC",
 355  		"CO",
 356  		"KM",
 357  		"CG",
 358  		"CD",
 359  		"CK",
 360  		"CR",
 361  		"CI",
 362  		"HR",
 363  		"CU",
 364  		"CW",
 365  		"CY",
 366  		"CZ",
 367  		"DK",
 368  		"DJ",
 369  		"DM",
 370  		"DO",
 371  		"EC",
 372  		"EG",
 373  		"SV",
 374  		"GQ",
 375  		"ER",
 376  		"EE",
 377  		"ET",
 378  		"FK",
 379  		"FO",
 380  		"FJ",
 381  		"FI",
 382  		"FR",
 383  		"GF",
 384  		"PF",
 385  		"TF",
 386  		"GA",
 387  		"GM",
 388  		"GE",
 389  		"DE",
 390  		"GH",
 391  		"GI",
 392  		"GR",
 393  		"GL",
 394  		"GD",
 395  		"GP",
 396  		"GU",
 397  		"GT",
 398  		"GG",
 399  		"GN",
 400  		"GW",
 401  		"GY",
 402  		"HT",
 403  		"HM",
 404  		"VA",
 405  		"HN",
 406  		"HK",
 407  		"HU",
 408  		"IS",
 409  		"IN",
 410  		"ID",
 411  		"IR",
 412  		"IQ",
 413  		"IE",
 414  		"IM",
 415  		"IL",
 416  		"IT",
 417  		"JM",
 418  		"JP",
 419  		"JE",
 420  		"JO",
 421  		"KZ",
 422  		"KE",
 423  		"KI",
 424  		"KP",
 425  		"KR",
 426  		"KW",
 427  		"KG",
 428  		"LA",
 429  		"LV",
 430  		"LB",
 431  		"LS",
 432  		"LR",
 433  		"LY",
 434  		"LI",
 435  		"LT",
 436  		"LU",
 437  		"MO",
 438  		"MK",
 439  		"MG",
 440  		"MW",
 441  		"MY",
 442  		"MV",
 443  		"ML",
 444  		"MT",
 445  		"MH",
 446  		"MQ",
 447  		"MR",
 448  		"MU",
 449  		"YT",
 450  		"MX",
 451  		"FM",
 452  		"MD",
 453  		"MC",
 454  		"MN",
 455  		"ME",
 456  		"MS",
 457  		"MA",
 458  		"MZ",
 459  		"MM",
 460  		"NA",
 461  		"NR",
 462  		"NP",
 463  		"NL",
 464  		"NC",
 465  		"NZ",
 466  		"NI",
 467  		"NE",
 468  		"NG",
 469  		"NU",
 470  		"NF",
 471  		"MP",
 472  		"NO",
 473  		"OM",
 474  		"PK",
 475  		"PW",
 476  		"PS",
 477  		"PA",
 478  		"PG",
 479  		"PY",
 480  		"PE",
 481  		"PH",
 482  		"PN",
 483  		"PL",
 484  		"PT",
 485  		"PR",
 486  		"QA",
 487  		"RE",
 488  		"RO",
 489  		"RU",
 490  		"RW",
 491  		"BL",
 492  		"SH",
 493  		"KN",
 494  		"LC",
 495  		"MF",
 496  		"PM",
 497  		"VC",
 498  		"WS",
 499  		"SM",
 500  		"ST",
 501  		"SA",
 502  		"SN",
 503  		"RS",
 504  		"SC",
 505  		"SL",
 506  		"SG",
 507  		"SX",
 508  		"SK",
 509  		"SI",
 510  		"SB",
 511  		"SO",
 512  		"ZA",
 513  		"GS",
 514  		"SS",
 515  		"ES",
 516  		"LK",
 517  		"SD",
 518  		"SR",
 519  		"SJ",
 520  		"SZ",
 521  		"SE",
 522  		"CH",
 523  		"SY",
 524  		"TW",
 525  		"TJ",
 526  		"TZ",
 527  		"TH",
 528  		"TL",
 529  		"TG",
 530  		"TK",
 531  		"TO",
 532  		"TT",
 533  		"TN",
 534  		"TR",
 535  		"TM",
 536  		"TC",
 537  		"TV",
 538  		"UG",
 539  		"UA",
 540  		"AE",
 541  		"GB",
 542  		"US",
 543  		"UM",
 544  		"UY",
 545  		"UZ",
 546  		"VU",
 547  		"VE",
 548  		"VN",
 549  		"VG",
 550  		"VI",
 551  		"WF",
 552  		"EH",
 553  		"YE",
 554  		"ZM",
 555  		"ZW",
 556  	}
 557  }
 558  
 559  func (enum CountryCode) MarshalJSON() ([]byte, error) {
 560  	return []byte(fmt.Sprintf(`"%s"`, enum)), nil
 561  }
 562  
 563  func (enum *CountryCode) UnmarshalJSON(data []byte) error {
 564  	tmp := ""
 565  
 566  	if err := json.Unmarshal(data, &tmp); err != nil {
 567  		return err
 568  	}
 569  
 570  	*enum = CountryCode(CountryCode(tmp).String())
 571  	return nil
 572  }
 573  
 574  type LanguageCode string
 575  
 576  const (
 577  	LanguageCodeUnknownLanguageCode = LanguageCode("unknown_language_code")
 578  	LanguageCodeEnUS                = LanguageCode("en_US")
 579  	LanguageCodeFrFR                = LanguageCode("fr_FR")
 580  	LanguageCodeDeDE                = LanguageCode("de_DE")
 581  )
 582  
 583  func (enum LanguageCode) String() string {
 584  	if enum == "" {
 585  		// return default value if empty
 586  		return string(LanguageCodeUnknownLanguageCode)
 587  	}
 588  	return string(enum)
 589  }
 590  
 591  func (enum LanguageCode) Values() []LanguageCode {
 592  	return []LanguageCode{
 593  		"unknown_language_code",
 594  		"en_US",
 595  		"fr_FR",
 596  		"de_DE",
 597  	}
 598  }
 599  
 600  func (enum LanguageCode) MarshalJSON() ([]byte, error) {
 601  	return []byte(fmt.Sprintf(`"%s"`, enum)), nil
 602  }
 603  
 604  func (enum *LanguageCode) UnmarshalJSON(data []byte) error {
 605  	tmp := ""
 606  
 607  	if err := json.Unmarshal(data, &tmp); err != nil {
 608  		return err
 609  	}
 610  
 611  	*enum = LanguageCode(LanguageCode(tmp).String())
 612  	return nil
 613  }
 614