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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// When writing a match expression against `LanguageCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let languagecode = unimplemented!();
/// match languagecode {
///     LanguageCode::AbGe => { /* ... */ },
///     LanguageCode::AfZa => { /* ... */ },
///     LanguageCode::ArAe => { /* ... */ },
///     LanguageCode::ArSa => { /* ... */ },
///     LanguageCode::AstEs => { /* ... */ },
///     LanguageCode::AzAz => { /* ... */ },
///     LanguageCode::BaRu => { /* ... */ },
///     LanguageCode::BeBy => { /* ... */ },
///     LanguageCode::BgBg => { /* ... */ },
///     LanguageCode::BnIn => { /* ... */ },
///     LanguageCode::BsBa => { /* ... */ },
///     LanguageCode::CaEs => { /* ... */ },
///     LanguageCode::CkbIq => { /* ... */ },
///     LanguageCode::CkbIr => { /* ... */ },
///     LanguageCode::CsCz => { /* ... */ },
///     LanguageCode::CyWl => { /* ... */ },
///     LanguageCode::DaDk => { /* ... */ },
///     LanguageCode::DeCh => { /* ... */ },
///     LanguageCode::DeDe => { /* ... */ },
///     LanguageCode::ElGr => { /* ... */ },
///     LanguageCode::EnAb => { /* ... */ },
///     LanguageCode::EnAu => { /* ... */ },
///     LanguageCode::EnGb => { /* ... */ },
///     LanguageCode::EnIe => { /* ... */ },
///     LanguageCode::EnIn => { /* ... */ },
///     LanguageCode::EnNz => { /* ... */ },
///     LanguageCode::EnUs => { /* ... */ },
///     LanguageCode::EnWl => { /* ... */ },
///     LanguageCode::EnZa => { /* ... */ },
///     LanguageCode::EsEs => { /* ... */ },
///     LanguageCode::EsUs => { /* ... */ },
///     LanguageCode::EtEt => { /* ... */ },
///     LanguageCode::EuEs => { /* ... */ },
///     LanguageCode::FaIr => { /* ... */ },
///     LanguageCode::FiFi => { /* ... */ },
///     LanguageCode::FrCa => { /* ... */ },
///     LanguageCode::FrFr => { /* ... */ },
///     LanguageCode::GlEs => { /* ... */ },
///     LanguageCode::GuIn => { /* ... */ },
///     LanguageCode::HaNg => { /* ... */ },
///     LanguageCode::HeIl => { /* ... */ },
///     LanguageCode::HiIn => { /* ... */ },
///     LanguageCode::HrHr => { /* ... */ },
///     LanguageCode::HuHu => { /* ... */ },
///     LanguageCode::HyAm => { /* ... */ },
///     LanguageCode::IdId => { /* ... */ },
///     LanguageCode::IsIs => { /* ... */ },
///     LanguageCode::ItIt => { /* ... */ },
///     LanguageCode::JaJp => { /* ... */ },
///     LanguageCode::KaGe => { /* ... */ },
///     LanguageCode::KabDz => { /* ... */ },
///     LanguageCode::KkKz => { /* ... */ },
///     LanguageCode::KnIn => { /* ... */ },
///     LanguageCode::KoKr => { /* ... */ },
///     LanguageCode::KyKg => { /* ... */ },
///     LanguageCode::LgIn => { /* ... */ },
///     LanguageCode::LtLt => { /* ... */ },
///     LanguageCode::LvLv => { /* ... */ },
///     LanguageCode::MhrRu => { /* ... */ },
///     LanguageCode::MiNz => { /* ... */ },
///     LanguageCode::MkMk => { /* ... */ },
///     LanguageCode::MlIn => { /* ... */ },
///     LanguageCode::MnMn => { /* ... */ },
///     LanguageCode::MrIn => { /* ... */ },
///     LanguageCode::MsMy => { /* ... */ },
///     LanguageCode::MtMt => { /* ... */ },
///     LanguageCode::NlNl => { /* ... */ },
///     LanguageCode::NoNo => { /* ... */ },
///     LanguageCode::OrIn => { /* ... */ },
///     LanguageCode::PaIn => { /* ... */ },
///     LanguageCode::PlPl => { /* ... */ },
///     LanguageCode::PsAf => { /* ... */ },
///     LanguageCode::PtBr => { /* ... */ },
///     LanguageCode::PtPt => { /* ... */ },
///     LanguageCode::RoRo => { /* ... */ },
///     LanguageCode::RuRu => { /* ... */ },
///     LanguageCode::RwRw => { /* ... */ },
///     LanguageCode::SiLk => { /* ... */ },
///     LanguageCode::SkSk => { /* ... */ },
///     LanguageCode::SlSi => { /* ... */ },
///     LanguageCode::SoSo => { /* ... */ },
///     LanguageCode::SrRs => { /* ... */ },
///     LanguageCode::SuId => { /* ... */ },
///     LanguageCode::SvSe => { /* ... */ },
///     LanguageCode::SwBi => { /* ... */ },
///     LanguageCode::SwKe => { /* ... */ },
///     LanguageCode::SwRw => { /* ... */ },
///     LanguageCode::SwTz => { /* ... */ },
///     LanguageCode::SwUg => { /* ... */ },
///     LanguageCode::TaIn => { /* ... */ },
///     LanguageCode::TeIn => { /* ... */ },
///     LanguageCode::ThTh => { /* ... */ },
///     LanguageCode::TlPh => { /* ... */ },
///     LanguageCode::TrTr => { /* ... */ },
///     LanguageCode::TtRu => { /* ... */ },
///     LanguageCode::UgCn => { /* ... */ },
///     LanguageCode::UkUa => { /* ... */ },
///     LanguageCode::UzUz => { /* ... */ },
///     LanguageCode::ViVn => { /* ... */ },
///     LanguageCode::WoSn => { /* ... */ },
///     LanguageCode::ZhCn => { /* ... */ },
///     LanguageCode::ZhTw => { /* ... */ },
///     LanguageCode::ZuZa => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `languagecode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `LanguageCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `LanguageCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `LanguageCode::NewFeature` is defined.
/// Specifically, when `languagecode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `LanguageCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
)]
pub enum LanguageCode {
    #[allow(missing_docs)] // documentation missing in model
    AbGe,
    #[allow(missing_docs)] // documentation missing in model
    AfZa,
    #[allow(missing_docs)] // documentation missing in model
    ArAe,
    #[allow(missing_docs)] // documentation missing in model
    ArSa,
    #[allow(missing_docs)] // documentation missing in model
    AstEs,
    #[allow(missing_docs)] // documentation missing in model
    AzAz,
    #[allow(missing_docs)] // documentation missing in model
    BaRu,
    #[allow(missing_docs)] // documentation missing in model
    BeBy,
    #[allow(missing_docs)] // documentation missing in model
    BgBg,
    #[allow(missing_docs)] // documentation missing in model
    BnIn,
    #[allow(missing_docs)] // documentation missing in model
    BsBa,
    #[allow(missing_docs)] // documentation missing in model
    CaEs,
    #[allow(missing_docs)] // documentation missing in model
    CkbIq,
    #[allow(missing_docs)] // documentation missing in model
    CkbIr,
    #[allow(missing_docs)] // documentation missing in model
    CsCz,
    #[allow(missing_docs)] // documentation missing in model
    CyWl,
    #[allow(missing_docs)] // documentation missing in model
    DaDk,
    #[allow(missing_docs)] // documentation missing in model
    DeCh,
    #[allow(missing_docs)] // documentation missing in model
    DeDe,
    #[allow(missing_docs)] // documentation missing in model
    ElGr,
    #[allow(missing_docs)] // documentation missing in model
    EnAb,
    #[allow(missing_docs)] // documentation missing in model
    EnAu,
    #[allow(missing_docs)] // documentation missing in model
    EnGb,
    #[allow(missing_docs)] // documentation missing in model
    EnIe,
    #[allow(missing_docs)] // documentation missing in model
    EnIn,
    #[allow(missing_docs)] // documentation missing in model
    EnNz,
    #[allow(missing_docs)] // documentation missing in model
    EnUs,
    #[allow(missing_docs)] // documentation missing in model
    EnWl,
    #[allow(missing_docs)] // documentation missing in model
    EnZa,
    #[allow(missing_docs)] // documentation missing in model
    EsEs,
    #[allow(missing_docs)] // documentation missing in model
    EsUs,
    #[allow(missing_docs)] // documentation missing in model
    EtEt,
    #[allow(missing_docs)] // documentation missing in model
    EuEs,
    #[allow(missing_docs)] // documentation missing in model
    FaIr,
    #[allow(missing_docs)] // documentation missing in model
    FiFi,
    #[allow(missing_docs)] // documentation missing in model
    FrCa,
    #[allow(missing_docs)] // documentation missing in model
    FrFr,
    #[allow(missing_docs)] // documentation missing in model
    GlEs,
    #[allow(missing_docs)] // documentation missing in model
    GuIn,
    #[allow(missing_docs)] // documentation missing in model
    HaNg,
    #[allow(missing_docs)] // documentation missing in model
    HeIl,
    #[allow(missing_docs)] // documentation missing in model
    HiIn,
    #[allow(missing_docs)] // documentation missing in model
    HrHr,
    #[allow(missing_docs)] // documentation missing in model
    HuHu,
    #[allow(missing_docs)] // documentation missing in model
    HyAm,
    #[allow(missing_docs)] // documentation missing in model
    IdId,
    #[allow(missing_docs)] // documentation missing in model
    IsIs,
    #[allow(missing_docs)] // documentation missing in model
    ItIt,
    #[allow(missing_docs)] // documentation missing in model
    JaJp,
    #[allow(missing_docs)] // documentation missing in model
    KaGe,
    #[allow(missing_docs)] // documentation missing in model
    KabDz,
    #[allow(missing_docs)] // documentation missing in model
    KkKz,
    #[allow(missing_docs)] // documentation missing in model
    KnIn,
    #[allow(missing_docs)] // documentation missing in model
    KoKr,
    #[allow(missing_docs)] // documentation missing in model
    KyKg,
    #[allow(missing_docs)] // documentation missing in model
    LgIn,
    #[allow(missing_docs)] // documentation missing in model
    LtLt,
    #[allow(missing_docs)] // documentation missing in model
    LvLv,
    #[allow(missing_docs)] // documentation missing in model
    MhrRu,
    #[allow(missing_docs)] // documentation missing in model
    MiNz,
    #[allow(missing_docs)] // documentation missing in model
    MkMk,
    #[allow(missing_docs)] // documentation missing in model
    MlIn,
    #[allow(missing_docs)] // documentation missing in model
    MnMn,
    #[allow(missing_docs)] // documentation missing in model
    MrIn,
    #[allow(missing_docs)] // documentation missing in model
    MsMy,
    #[allow(missing_docs)] // documentation missing in model
    MtMt,
    #[allow(missing_docs)] // documentation missing in model
    NlNl,
    #[allow(missing_docs)] // documentation missing in model
    NoNo,
    #[allow(missing_docs)] // documentation missing in model
    OrIn,
    #[allow(missing_docs)] // documentation missing in model
    PaIn,
    #[allow(missing_docs)] // documentation missing in model
    PlPl,
    #[allow(missing_docs)] // documentation missing in model
    PsAf,
    #[allow(missing_docs)] // documentation missing in model
    PtBr,
    #[allow(missing_docs)] // documentation missing in model
    PtPt,
    #[allow(missing_docs)] // documentation missing in model
    RoRo,
    #[allow(missing_docs)] // documentation missing in model
    RuRu,
    #[allow(missing_docs)] // documentation missing in model
    RwRw,
    #[allow(missing_docs)] // documentation missing in model
    SiLk,
    #[allow(missing_docs)] // documentation missing in model
    SkSk,
    #[allow(missing_docs)] // documentation missing in model
    SlSi,
    #[allow(missing_docs)] // documentation missing in model
    SoSo,
    #[allow(missing_docs)] // documentation missing in model
    SrRs,
    #[allow(missing_docs)] // documentation missing in model
    SuId,
    #[allow(missing_docs)] // documentation missing in model
    SvSe,
    #[allow(missing_docs)] // documentation missing in model
    SwBi,
    #[allow(missing_docs)] // documentation missing in model
    SwKe,
    #[allow(missing_docs)] // documentation missing in model
    SwRw,
    #[allow(missing_docs)] // documentation missing in model
    SwTz,
    #[allow(missing_docs)] // documentation missing in model
    SwUg,
    #[allow(missing_docs)] // documentation missing in model
    TaIn,
    #[allow(missing_docs)] // documentation missing in model
    TeIn,
    #[allow(missing_docs)] // documentation missing in model
    ThTh,
    #[allow(missing_docs)] // documentation missing in model
    TlPh,
    #[allow(missing_docs)] // documentation missing in model
    TrTr,
    #[allow(missing_docs)] // documentation missing in model
    TtRu,
    #[allow(missing_docs)] // documentation missing in model
    UgCn,
    #[allow(missing_docs)] // documentation missing in model
    UkUa,
    #[allow(missing_docs)] // documentation missing in model
    UzUz,
    #[allow(missing_docs)] // documentation missing in model
    ViVn,
    #[allow(missing_docs)] // documentation missing in model
    WoSn,
    #[allow(missing_docs)] // documentation missing in model
    ZhCn,
    #[allow(missing_docs)] // documentation missing in model
    ZhTw,
    #[allow(missing_docs)] // documentation missing in model
    ZuZa,
    /// `Unknown` contains new variants that have been added since this code was generated.
    #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")]
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue),
}
impl ::std::convert::From<&str> for LanguageCode {
    fn from(s: &str) -> Self {
        match s {
            "ab-GE" => LanguageCode::AbGe,
            "af-ZA" => LanguageCode::AfZa,
            "ar-AE" => LanguageCode::ArAe,
            "ar-SA" => LanguageCode::ArSa,
            "ast-ES" => LanguageCode::AstEs,
            "az-AZ" => LanguageCode::AzAz,
            "ba-RU" => LanguageCode::BaRu,
            "be-BY" => LanguageCode::BeBy,
            "bg-BG" => LanguageCode::BgBg,
            "bn-IN" => LanguageCode::BnIn,
            "bs-BA" => LanguageCode::BsBa,
            "ca-ES" => LanguageCode::CaEs,
            "ckb-IQ" => LanguageCode::CkbIq,
            "ckb-IR" => LanguageCode::CkbIr,
            "cs-CZ" => LanguageCode::CsCz,
            "cy-WL" => LanguageCode::CyWl,
            "da-DK" => LanguageCode::DaDk,
            "de-CH" => LanguageCode::DeCh,
            "de-DE" => LanguageCode::DeDe,
            "el-GR" => LanguageCode::ElGr,
            "en-AB" => LanguageCode::EnAb,
            "en-AU" => LanguageCode::EnAu,
            "en-GB" => LanguageCode::EnGb,
            "en-IE" => LanguageCode::EnIe,
            "en-IN" => LanguageCode::EnIn,
            "en-NZ" => LanguageCode::EnNz,
            "en-US" => LanguageCode::EnUs,
            "en-WL" => LanguageCode::EnWl,
            "en-ZA" => LanguageCode::EnZa,
            "es-ES" => LanguageCode::EsEs,
            "es-US" => LanguageCode::EsUs,
            "et-ET" => LanguageCode::EtEt,
            "eu-ES" => LanguageCode::EuEs,
            "fa-IR" => LanguageCode::FaIr,
            "fi-FI" => LanguageCode::FiFi,
            "fr-CA" => LanguageCode::FrCa,
            "fr-FR" => LanguageCode::FrFr,
            "gl-ES" => LanguageCode::GlEs,
            "gu-IN" => LanguageCode::GuIn,
            "ha-NG" => LanguageCode::HaNg,
            "he-IL" => LanguageCode::HeIl,
            "hi-IN" => LanguageCode::HiIn,
            "hr-HR" => LanguageCode::HrHr,
            "hu-HU" => LanguageCode::HuHu,
            "hy-AM" => LanguageCode::HyAm,
            "id-ID" => LanguageCode::IdId,
            "is-IS" => LanguageCode::IsIs,
            "it-IT" => LanguageCode::ItIt,
            "ja-JP" => LanguageCode::JaJp,
            "ka-GE" => LanguageCode::KaGe,
            "kab-DZ" => LanguageCode::KabDz,
            "kk-KZ" => LanguageCode::KkKz,
            "kn-IN" => LanguageCode::KnIn,
            "ko-KR" => LanguageCode::KoKr,
            "ky-KG" => LanguageCode::KyKg,
            "lg-IN" => LanguageCode::LgIn,
            "lt-LT" => LanguageCode::LtLt,
            "lv-LV" => LanguageCode::LvLv,
            "mhr-RU" => LanguageCode::MhrRu,
            "mi-NZ" => LanguageCode::MiNz,
            "mk-MK" => LanguageCode::MkMk,
            "ml-IN" => LanguageCode::MlIn,
            "mn-MN" => LanguageCode::MnMn,
            "mr-IN" => LanguageCode::MrIn,
            "ms-MY" => LanguageCode::MsMy,
            "mt-MT" => LanguageCode::MtMt,
            "nl-NL" => LanguageCode::NlNl,
            "no-NO" => LanguageCode::NoNo,
            "or-IN" => LanguageCode::OrIn,
            "pa-IN" => LanguageCode::PaIn,
            "pl-PL" => LanguageCode::PlPl,
            "ps-AF" => LanguageCode::PsAf,
            "pt-BR" => LanguageCode::PtBr,
            "pt-PT" => LanguageCode::PtPt,
            "ro-RO" => LanguageCode::RoRo,
            "ru-RU" => LanguageCode::RuRu,
            "rw-RW" => LanguageCode::RwRw,
            "si-LK" => LanguageCode::SiLk,
            "sk-SK" => LanguageCode::SkSk,
            "sl-SI" => LanguageCode::SlSi,
            "so-SO" => LanguageCode::SoSo,
            "sr-RS" => LanguageCode::SrRs,
            "su-ID" => LanguageCode::SuId,
            "sv-SE" => LanguageCode::SvSe,
            "sw-BI" => LanguageCode::SwBi,
            "sw-KE" => LanguageCode::SwKe,
            "sw-RW" => LanguageCode::SwRw,
            "sw-TZ" => LanguageCode::SwTz,
            "sw-UG" => LanguageCode::SwUg,
            "ta-IN" => LanguageCode::TaIn,
            "te-IN" => LanguageCode::TeIn,
            "th-TH" => LanguageCode::ThTh,
            "tl-PH" => LanguageCode::TlPh,
            "tr-TR" => LanguageCode::TrTr,
            "tt-RU" => LanguageCode::TtRu,
            "ug-CN" => LanguageCode::UgCn,
            "uk-UA" => LanguageCode::UkUa,
            "uz-UZ" => LanguageCode::UzUz,
            "vi-VN" => LanguageCode::ViVn,
            "wo-SN" => LanguageCode::WoSn,
            "zh-CN" => LanguageCode::ZhCn,
            "zh-TW" => LanguageCode::ZhTw,
            "zu-ZA" => LanguageCode::ZuZa,
            other => LanguageCode::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl ::std::str::FromStr for LanguageCode {
    type Err = ::std::convert::Infallible;

    fn from_str(s: &str) -> ::std::result::Result<Self, <Self as ::std::str::FromStr>::Err> {
        ::std::result::Result::Ok(LanguageCode::from(s))
    }
}
impl LanguageCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            LanguageCode::AbGe => "ab-GE",
            LanguageCode::AfZa => "af-ZA",
            LanguageCode::ArAe => "ar-AE",
            LanguageCode::ArSa => "ar-SA",
            LanguageCode::AstEs => "ast-ES",
            LanguageCode::AzAz => "az-AZ",
            LanguageCode::BaRu => "ba-RU",
            LanguageCode::BeBy => "be-BY",
            LanguageCode::BgBg => "bg-BG",
            LanguageCode::BnIn => "bn-IN",
            LanguageCode::BsBa => "bs-BA",
            LanguageCode::CaEs => "ca-ES",
            LanguageCode::CkbIq => "ckb-IQ",
            LanguageCode::CkbIr => "ckb-IR",
            LanguageCode::CsCz => "cs-CZ",
            LanguageCode::CyWl => "cy-WL",
            LanguageCode::DaDk => "da-DK",
            LanguageCode::DeCh => "de-CH",
            LanguageCode::DeDe => "de-DE",
            LanguageCode::ElGr => "el-GR",
            LanguageCode::EnAb => "en-AB",
            LanguageCode::EnAu => "en-AU",
            LanguageCode::EnGb => "en-GB",
            LanguageCode::EnIe => "en-IE",
            LanguageCode::EnIn => "en-IN",
            LanguageCode::EnNz => "en-NZ",
            LanguageCode::EnUs => "en-US",
            LanguageCode::EnWl => "en-WL",
            LanguageCode::EnZa => "en-ZA",
            LanguageCode::EsEs => "es-ES",
            LanguageCode::EsUs => "es-US",
            LanguageCode::EtEt => "et-ET",
            LanguageCode::EuEs => "eu-ES",
            LanguageCode::FaIr => "fa-IR",
            LanguageCode::FiFi => "fi-FI",
            LanguageCode::FrCa => "fr-CA",
            LanguageCode::FrFr => "fr-FR",
            LanguageCode::GlEs => "gl-ES",
            LanguageCode::GuIn => "gu-IN",
            LanguageCode::HaNg => "ha-NG",
            LanguageCode::HeIl => "he-IL",
            LanguageCode::HiIn => "hi-IN",
            LanguageCode::HrHr => "hr-HR",
            LanguageCode::HuHu => "hu-HU",
            LanguageCode::HyAm => "hy-AM",
            LanguageCode::IdId => "id-ID",
            LanguageCode::IsIs => "is-IS",
            LanguageCode::ItIt => "it-IT",
            LanguageCode::JaJp => "ja-JP",
            LanguageCode::KaGe => "ka-GE",
            LanguageCode::KabDz => "kab-DZ",
            LanguageCode::KkKz => "kk-KZ",
            LanguageCode::KnIn => "kn-IN",
            LanguageCode::KoKr => "ko-KR",
            LanguageCode::KyKg => "ky-KG",
            LanguageCode::LgIn => "lg-IN",
            LanguageCode::LtLt => "lt-LT",
            LanguageCode::LvLv => "lv-LV",
            LanguageCode::MhrRu => "mhr-RU",
            LanguageCode::MiNz => "mi-NZ",
            LanguageCode::MkMk => "mk-MK",
            LanguageCode::MlIn => "ml-IN",
            LanguageCode::MnMn => "mn-MN",
            LanguageCode::MrIn => "mr-IN",
            LanguageCode::MsMy => "ms-MY",
            LanguageCode::MtMt => "mt-MT",
            LanguageCode::NlNl => "nl-NL",
            LanguageCode::NoNo => "no-NO",
            LanguageCode::OrIn => "or-IN",
            LanguageCode::PaIn => "pa-IN",
            LanguageCode::PlPl => "pl-PL",
            LanguageCode::PsAf => "ps-AF",
            LanguageCode::PtBr => "pt-BR",
            LanguageCode::PtPt => "pt-PT",
            LanguageCode::RoRo => "ro-RO",
            LanguageCode::RuRu => "ru-RU",
            LanguageCode::RwRw => "rw-RW",
            LanguageCode::SiLk => "si-LK",
            LanguageCode::SkSk => "sk-SK",
            LanguageCode::SlSi => "sl-SI",
            LanguageCode::SoSo => "so-SO",
            LanguageCode::SrRs => "sr-RS",
            LanguageCode::SuId => "su-ID",
            LanguageCode::SvSe => "sv-SE",
            LanguageCode::SwBi => "sw-BI",
            LanguageCode::SwKe => "sw-KE",
            LanguageCode::SwRw => "sw-RW",
            LanguageCode::SwTz => "sw-TZ",
            LanguageCode::SwUg => "sw-UG",
            LanguageCode::TaIn => "ta-IN",
            LanguageCode::TeIn => "te-IN",
            LanguageCode::ThTh => "th-TH",
            LanguageCode::TlPh => "tl-PH",
            LanguageCode::TrTr => "tr-TR",
            LanguageCode::TtRu => "tt-RU",
            LanguageCode::UgCn => "ug-CN",
            LanguageCode::UkUa => "uk-UA",
            LanguageCode::UzUz => "uz-UZ",
            LanguageCode::ViVn => "vi-VN",
            LanguageCode::WoSn => "wo-SN",
            LanguageCode::ZhCn => "zh-CN",
            LanguageCode::ZhTw => "zh-TW",
            LanguageCode::ZuZa => "zu-ZA",
            LanguageCode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` representations of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "ab-GE", "af-ZA", "ar-AE", "ar-SA", "ast-ES", "az-AZ", "ba-RU", "be-BY", "bg-BG", "bn-IN", "bs-BA", "ca-ES", "ckb-IQ", "ckb-IR", "cs-CZ",
            "cy-WL", "da-DK", "de-CH", "de-DE", "el-GR", "en-AB", "en-AU", "en-GB", "en-IE", "en-IN", "en-NZ", "en-US", "en-WL", "en-ZA", "es-ES",
            "es-US", "et-ET", "eu-ES", "fa-IR", "fi-FI", "fr-CA", "fr-FR", "gl-ES", "gu-IN", "ha-NG", "he-IL", "hi-IN", "hr-HR", "hu-HU", "hy-AM",
            "id-ID", "is-IS", "it-IT", "ja-JP", "ka-GE", "kab-DZ", "kk-KZ", "kn-IN", "ko-KR", "ky-KG", "lg-IN", "lt-LT", "lv-LV", "mhr-RU", "mi-NZ",
            "mk-MK", "ml-IN", "mn-MN", "mr-IN", "ms-MY", "mt-MT", "nl-NL", "no-NO", "or-IN", "pa-IN", "pl-PL", "ps-AF", "pt-BR", "pt-PT", "ro-RO",
            "ru-RU", "rw-RW", "si-LK", "sk-SK", "sl-SI", "so-SO", "sr-RS", "su-ID", "sv-SE", "sw-BI", "sw-KE", "sw-RW", "sw-TZ", "sw-UG", "ta-IN",
            "te-IN", "th-TH", "tl-PH", "tr-TR", "tt-RU", "ug-CN", "uk-UA", "uz-UZ", "vi-VN", "wo-SN", "zh-CN", "zh-TW", "zu-ZA",
        ]
    }
}
impl ::std::convert::AsRef<str> for LanguageCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
impl LanguageCode {
    /// Parses the enum value while disallowing unknown variants.
    ///
    /// Unknown variants will result in an error.
    pub fn try_parse(value: &str) -> ::std::result::Result<Self, crate::error::UnknownVariantError> {
        match Self::from(value) {
            #[allow(deprecated)]
            Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)),
            known => Ok(known),
        }
    }
}
impl ::std::fmt::Display for LanguageCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        match self {
            LanguageCode::AbGe => write!(f, "ab-GE"),
            LanguageCode::AfZa => write!(f, "af-ZA"),
            LanguageCode::ArAe => write!(f, "ar-AE"),
            LanguageCode::ArSa => write!(f, "ar-SA"),
            LanguageCode::AstEs => write!(f, "ast-ES"),
            LanguageCode::AzAz => write!(f, "az-AZ"),
            LanguageCode::BaRu => write!(f, "ba-RU"),
            LanguageCode::BeBy => write!(f, "be-BY"),
            LanguageCode::BgBg => write!(f, "bg-BG"),
            LanguageCode::BnIn => write!(f, "bn-IN"),
            LanguageCode::BsBa => write!(f, "bs-BA"),
            LanguageCode::CaEs => write!(f, "ca-ES"),
            LanguageCode::CkbIq => write!(f, "ckb-IQ"),
            LanguageCode::CkbIr => write!(f, "ckb-IR"),
            LanguageCode::CsCz => write!(f, "cs-CZ"),
            LanguageCode::CyWl => write!(f, "cy-WL"),
            LanguageCode::DaDk => write!(f, "da-DK"),
            LanguageCode::DeCh => write!(f, "de-CH"),
            LanguageCode::DeDe => write!(f, "de-DE"),
            LanguageCode::ElGr => write!(f, "el-GR"),
            LanguageCode::EnAb => write!(f, "en-AB"),
            LanguageCode::EnAu => write!(f, "en-AU"),
            LanguageCode::EnGb => write!(f, "en-GB"),
            LanguageCode::EnIe => write!(f, "en-IE"),
            LanguageCode::EnIn => write!(f, "en-IN"),
            LanguageCode::EnNz => write!(f, "en-NZ"),
            LanguageCode::EnUs => write!(f, "en-US"),
            LanguageCode::EnWl => write!(f, "en-WL"),
            LanguageCode::EnZa => write!(f, "en-ZA"),
            LanguageCode::EsEs => write!(f, "es-ES"),
            LanguageCode::EsUs => write!(f, "es-US"),
            LanguageCode::EtEt => write!(f, "et-ET"),
            LanguageCode::EuEs => write!(f, "eu-ES"),
            LanguageCode::FaIr => write!(f, "fa-IR"),
            LanguageCode::FiFi => write!(f, "fi-FI"),
            LanguageCode::FrCa => write!(f, "fr-CA"),
            LanguageCode::FrFr => write!(f, "fr-FR"),
            LanguageCode::GlEs => write!(f, "gl-ES"),
            LanguageCode::GuIn => write!(f, "gu-IN"),
            LanguageCode::HaNg => write!(f, "ha-NG"),
            LanguageCode::HeIl => write!(f, "he-IL"),
            LanguageCode::HiIn => write!(f, "hi-IN"),
            LanguageCode::HrHr => write!(f, "hr-HR"),
            LanguageCode::HuHu => write!(f, "hu-HU"),
            LanguageCode::HyAm => write!(f, "hy-AM"),
            LanguageCode::IdId => write!(f, "id-ID"),
            LanguageCode::IsIs => write!(f, "is-IS"),
            LanguageCode::ItIt => write!(f, "it-IT"),
            LanguageCode::JaJp => write!(f, "ja-JP"),
            LanguageCode::KaGe => write!(f, "ka-GE"),
            LanguageCode::KabDz => write!(f, "kab-DZ"),
            LanguageCode::KkKz => write!(f, "kk-KZ"),
            LanguageCode::KnIn => write!(f, "kn-IN"),
            LanguageCode::KoKr => write!(f, "ko-KR"),
            LanguageCode::KyKg => write!(f, "ky-KG"),
            LanguageCode::LgIn => write!(f, "lg-IN"),
            LanguageCode::LtLt => write!(f, "lt-LT"),
            LanguageCode::LvLv => write!(f, "lv-LV"),
            LanguageCode::MhrRu => write!(f, "mhr-RU"),
            LanguageCode::MiNz => write!(f, "mi-NZ"),
            LanguageCode::MkMk => write!(f, "mk-MK"),
            LanguageCode::MlIn => write!(f, "ml-IN"),
            LanguageCode::MnMn => write!(f, "mn-MN"),
            LanguageCode::MrIn => write!(f, "mr-IN"),
            LanguageCode::MsMy => write!(f, "ms-MY"),
            LanguageCode::MtMt => write!(f, "mt-MT"),
            LanguageCode::NlNl => write!(f, "nl-NL"),
            LanguageCode::NoNo => write!(f, "no-NO"),
            LanguageCode::OrIn => write!(f, "or-IN"),
            LanguageCode::PaIn => write!(f, "pa-IN"),
            LanguageCode::PlPl => write!(f, "pl-PL"),
            LanguageCode::PsAf => write!(f, "ps-AF"),
            LanguageCode::PtBr => write!(f, "pt-BR"),
            LanguageCode::PtPt => write!(f, "pt-PT"),
            LanguageCode::RoRo => write!(f, "ro-RO"),
            LanguageCode::RuRu => write!(f, "ru-RU"),
            LanguageCode::RwRw => write!(f, "rw-RW"),
            LanguageCode::SiLk => write!(f, "si-LK"),
            LanguageCode::SkSk => write!(f, "sk-SK"),
            LanguageCode::SlSi => write!(f, "sl-SI"),
            LanguageCode::SoSo => write!(f, "so-SO"),
            LanguageCode::SrRs => write!(f, "sr-RS"),
            LanguageCode::SuId => write!(f, "su-ID"),
            LanguageCode::SvSe => write!(f, "sv-SE"),
            LanguageCode::SwBi => write!(f, "sw-BI"),
            LanguageCode::SwKe => write!(f, "sw-KE"),
            LanguageCode::SwRw => write!(f, "sw-RW"),
            LanguageCode::SwTz => write!(f, "sw-TZ"),
            LanguageCode::SwUg => write!(f, "sw-UG"),
            LanguageCode::TaIn => write!(f, "ta-IN"),
            LanguageCode::TeIn => write!(f, "te-IN"),
            LanguageCode::ThTh => write!(f, "th-TH"),
            LanguageCode::TlPh => write!(f, "tl-PH"),
            LanguageCode::TrTr => write!(f, "tr-TR"),
            LanguageCode::TtRu => write!(f, "tt-RU"),
            LanguageCode::UgCn => write!(f, "ug-CN"),
            LanguageCode::UkUa => write!(f, "uk-UA"),
            LanguageCode::UzUz => write!(f, "uz-UZ"),
            LanguageCode::ViVn => write!(f, "vi-VN"),
            LanguageCode::WoSn => write!(f, "wo-SN"),
            LanguageCode::ZhCn => write!(f, "zh-CN"),
            LanguageCode::ZhTw => write!(f, "zh-TW"),
            LanguageCode::ZuZa => write!(f, "zu-ZA"),
            LanguageCode::Unknown(value) => write!(f, "{}", value),
        }
    }
}