// 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::AfZa => { /* ... */ },
///     LanguageCode::AmEt => { /* ... */ },
///     LanguageCode::ArAe => { /* ... */ },
///     LanguageCode::ArSa => { /* ... */ },
///     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::EsMx => { /* ... */ },
///     LanguageCode::EsUs => { /* ... */ },
///     LanguageCode::EtEt => { /* ... */ },
///     LanguageCode::EuEs => { /* ... */ },
///     LanguageCode::FaAf => { /* ... */ },
///     LanguageCode::FaIr => { /* ... */ },
///     LanguageCode::FiFi => { /* ... */ },
///     LanguageCode::FrCa => { /* ... */ },
///     LanguageCode::FrFr => { /* ... */ },
///     LanguageCode::GlEs => { /* ... */ },
///     LanguageCode::GuIn => { /* ... */ },
///     LanguageCode::HeIl => { /* ... */ },
///     LanguageCode::HiIn => { /* ... */ },
///     LanguageCode::HrHr => { /* ... */ },
///     LanguageCode::HtHt => { /* ... */ },
///     LanguageCode::HuHu => { /* ... */ },
///     LanguageCode::HyAm => { /* ... */ },
///     LanguageCode::IdId => { /* ... */ },
///     LanguageCode::IsIs => { /* ... */ },
///     LanguageCode::ItIt => { /* ... */ },
///     LanguageCode::JaJp => { /* ... */ },
///     LanguageCode::JvId => { /* ... */ },
///     LanguageCode::KaGe => { /* ... */ },
///     LanguageCode::KabDz => { /* ... */ },
///     LanguageCode::KkKz => { /* ... */ },
///     LanguageCode::KmKh => { /* ... */ },
///     LanguageCode::KnIn => { /* ... */ },
///     LanguageCode::KoKr => { /* ... */ },
///     LanguageCode::LgIn => { /* ... */ },
///     LanguageCode::LtLt => { /* ... */ },
///     LanguageCode::LvLv => { /* ... */ },
///     LanguageCode::MkMk => { /* ... */ },
///     LanguageCode::MlIn => { /* ... */ },
///     LanguageCode::MrIn => { /* ... */ },
///     LanguageCode::MsMy => { /* ... */ },
///     LanguageCode::MyMm => { /* ... */ },
///     LanguageCode::NeNp => { /* ... */ },
///     LanguageCode::NlNl => { /* ... */ },
///     LanguageCode::NoNo => { /* ... */ },
///     LanguageCode::OrIn => { /* ... */ },
///     LanguageCode::PaIn => { /* ... */ },
///     LanguageCode::PlPl => { /* ... */ },
///     LanguageCode::PsAf => { /* ... */ },
///     LanguageCode::PtBr => { /* ... */ },
///     LanguageCode::PtPt => { /* ... */ },
///     LanguageCode::RoRo => { /* ... */ },
///     LanguageCode::RuRu => { /* ... */ },
///     LanguageCode::SiLk => { /* ... */ },
///     LanguageCode::SkSk => { /* ... */ },
///     LanguageCode::SlSi => { /* ... */ },
///     LanguageCode::SoSo => { /* ... */ },
///     LanguageCode::SqAl => { /* ... */ },
///     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::UkUa => { /* ... */ },
///     LanguageCode::UzUz => { /* ... */ },
///     LanguageCode::ViVn => { /* ... */ },
///     LanguageCode::ZhCn => { /* ... */ },
///     LanguageCode::ZhHk => { /* ... */ },
///     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
    AfZa,
    #[allow(missing_docs)] // documentation missing in model
    AmEt,
    #[allow(missing_docs)] // documentation missing in model
    ArAe,
    #[allow(missing_docs)] // documentation missing in model
    ArSa,
    #[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
    EsMx,
    #[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
    FaAf,
    #[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
    HeIl,
    #[allow(missing_docs)] // documentation missing in model
    HiIn,
    #[allow(missing_docs)] // documentation missing in model
    HrHr,
    #[allow(missing_docs)] // documentation missing in model
    HtHt,
    #[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
    JvId,
    #[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
    KmKh,
    #[allow(missing_docs)] // documentation missing in model
    KnIn,
    #[allow(missing_docs)] // documentation missing in model
    KoKr,
    #[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
    MkMk,
    #[allow(missing_docs)] // documentation missing in model
    MlIn,
    #[allow(missing_docs)] // documentation missing in model
    MrIn,
    #[allow(missing_docs)] // documentation missing in model
    MsMy,
    #[allow(missing_docs)] // documentation missing in model
    MyMm,
    #[allow(missing_docs)] // documentation missing in model
    NeNp,
    #[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
    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
    SqAl,
    #[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
    UkUa,
    #[allow(missing_docs)] // documentation missing in model
    UzUz,
    #[allow(missing_docs)] // documentation missing in model
    ViVn,
    #[allow(missing_docs)] // documentation missing in model
    ZhCn,
    #[allow(missing_docs)] // documentation missing in model
    ZhHk,
    #[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 {
            "af-ZA" => LanguageCode::AfZa,
            "am-ET" => LanguageCode::AmEt,
            "ar-AE" => LanguageCode::ArAe,
            "ar-SA" => LanguageCode::ArSa,
            "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-MX" => LanguageCode::EsMx,
            "es-US" => LanguageCode::EsUs,
            "et-ET" => LanguageCode::EtEt,
            "eu-ES" => LanguageCode::EuEs,
            "fa-AF" => LanguageCode::FaAf,
            "fa-IR" => LanguageCode::FaIr,
            "fi-FI" => LanguageCode::FiFi,
            "fr-CA" => LanguageCode::FrCa,
            "fr-FR" => LanguageCode::FrFr,
            "gl-ES" => LanguageCode::GlEs,
            "gu-IN" => LanguageCode::GuIn,
            "he-IL" => LanguageCode::HeIl,
            "hi-IN" => LanguageCode::HiIn,
            "hr-HR" => LanguageCode::HrHr,
            "ht-HT" => LanguageCode::HtHt,
            "hu-HU" => LanguageCode::HuHu,
            "hy-AM" => LanguageCode::HyAm,
            "id-ID" => LanguageCode::IdId,
            "is-IS" => LanguageCode::IsIs,
            "it-IT" => LanguageCode::ItIt,
            "ja-JP" => LanguageCode::JaJp,
            "jv-ID" => LanguageCode::JvId,
            "ka-GE" => LanguageCode::KaGe,
            "kab-DZ" => LanguageCode::KabDz,
            "kk-KZ" => LanguageCode::KkKz,
            "km-KH" => LanguageCode::KmKh,
            "kn-IN" => LanguageCode::KnIn,
            "ko-KR" => LanguageCode::KoKr,
            "lg-IN" => LanguageCode::LgIn,
            "lt-LT" => LanguageCode::LtLt,
            "lv-LV" => LanguageCode::LvLv,
            "mk-MK" => LanguageCode::MkMk,
            "ml-IN" => LanguageCode::MlIn,
            "mr-IN" => LanguageCode::MrIn,
            "ms-MY" => LanguageCode::MsMy,
            "my-MM" => LanguageCode::MyMm,
            "ne-NP" => LanguageCode::NeNp,
            "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,
            "si-LK" => LanguageCode::SiLk,
            "sk-SK" => LanguageCode::SkSk,
            "sl-SI" => LanguageCode::SlSi,
            "so-SO" => LanguageCode::SoSo,
            "sq-AL" => LanguageCode::SqAl,
            "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,
            "uk-UA" => LanguageCode::UkUa,
            "uz-UZ" => LanguageCode::UzUz,
            "vi-VN" => LanguageCode::ViVn,
            "zh-CN" => LanguageCode::ZhCn,
            "zh-HK" => LanguageCode::ZhHk,
            "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::AfZa => "af-ZA",
            LanguageCode::AmEt => "am-ET",
            LanguageCode::ArAe => "ar-AE",
            LanguageCode::ArSa => "ar-SA",
            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::EsMx => "es-MX",
            LanguageCode::EsUs => "es-US",
            LanguageCode::EtEt => "et-ET",
            LanguageCode::EuEs => "eu-ES",
            LanguageCode::FaAf => "fa-AF",
            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::HeIl => "he-IL",
            LanguageCode::HiIn => "hi-IN",
            LanguageCode::HrHr => "hr-HR",
            LanguageCode::HtHt => "ht-HT",
            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::JvId => "jv-ID",
            LanguageCode::KaGe => "ka-GE",
            LanguageCode::KabDz => "kab-DZ",
            LanguageCode::KkKz => "kk-KZ",
            LanguageCode::KmKh => "km-KH",
            LanguageCode::KnIn => "kn-IN",
            LanguageCode::KoKr => "ko-KR",
            LanguageCode::LgIn => "lg-IN",
            LanguageCode::LtLt => "lt-LT",
            LanguageCode::LvLv => "lv-LV",
            LanguageCode::MkMk => "mk-MK",
            LanguageCode::MlIn => "ml-IN",
            LanguageCode::MrIn => "mr-IN",
            LanguageCode::MsMy => "ms-MY",
            LanguageCode::MyMm => "my-MM",
            LanguageCode::NeNp => "ne-NP",
            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::SiLk => "si-LK",
            LanguageCode::SkSk => "sk-SK",
            LanguageCode::SlSi => "sl-SI",
            LanguageCode::SoSo => "so-SO",
            LanguageCode::SqAl => "sq-AL",
            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::UkUa => "uk-UA",
            LanguageCode::UzUz => "uz-UZ",
            LanguageCode::ViVn => "vi-VN",
            LanguageCode::ZhCn => "zh-CN",
            LanguageCode::ZhHk => "zh-HK",
            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] {
        &[
            "af-ZA", "am-ET", "ar-AE", "ar-SA", "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-MX", "es-US", "et-ET",
            "eu-ES", "fa-AF", "fa-IR", "fi-FI", "fr-CA", "fr-FR", "gl-ES", "gu-IN", "he-IL", "hi-IN", "hr-HR", "ht-HT", "hu-HU", "hy-AM", "id-ID",
            "is-IS", "it-IT", "ja-JP", "jv-ID", "ka-GE", "kab-DZ", "kk-KZ", "km-KH", "kn-IN", "ko-KR", "lg-IN", "lt-LT", "lv-LV", "mk-MK", "ml-IN",
            "mr-IN", "ms-MY", "my-MM", "ne-NP", "nl-NL", "no-NO", "or-IN", "pa-IN", "pl-PL", "ps-AF", "pt-BR", "pt-PT", "ro-RO", "ru-RU", "si-LK",
            "sk-SK", "sl-SI", "so-SO", "sq-AL", "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", "uk-UA", "uz-UZ", "vi-VN", "zh-CN", "zh-HK", "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::AfZa => write!(f, "af-ZA"),
            LanguageCode::AmEt => write!(f, "am-ET"),
            LanguageCode::ArAe => write!(f, "ar-AE"),
            LanguageCode::ArSa => write!(f, "ar-SA"),
            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::EsMx => write!(f, "es-MX"),
            LanguageCode::EsUs => write!(f, "es-US"),
            LanguageCode::EtEt => write!(f, "et-ET"),
            LanguageCode::EuEs => write!(f, "eu-ES"),
            LanguageCode::FaAf => write!(f, "fa-AF"),
            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::HeIl => write!(f, "he-IL"),
            LanguageCode::HiIn => write!(f, "hi-IN"),
            LanguageCode::HrHr => write!(f, "hr-HR"),
            LanguageCode::HtHt => write!(f, "ht-HT"),
            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::JvId => write!(f, "jv-ID"),
            LanguageCode::KaGe => write!(f, "ka-GE"),
            LanguageCode::KabDz => write!(f, "kab-DZ"),
            LanguageCode::KkKz => write!(f, "kk-KZ"),
            LanguageCode::KmKh => write!(f, "km-KH"),
            LanguageCode::KnIn => write!(f, "kn-IN"),
            LanguageCode::KoKr => write!(f, "ko-KR"),
            LanguageCode::LgIn => write!(f, "lg-IN"),
            LanguageCode::LtLt => write!(f, "lt-LT"),
            LanguageCode::LvLv => write!(f, "lv-LV"),
            LanguageCode::MkMk => write!(f, "mk-MK"),
            LanguageCode::MlIn => write!(f, "ml-IN"),
            LanguageCode::MrIn => write!(f, "mr-IN"),
            LanguageCode::MsMy => write!(f, "ms-MY"),
            LanguageCode::MyMm => write!(f, "my-MM"),
            LanguageCode::NeNp => write!(f, "ne-NP"),
            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::SiLk => write!(f, "si-LK"),
            LanguageCode::SkSk => write!(f, "sk-SK"),
            LanguageCode::SlSi => write!(f, "sl-SI"),
            LanguageCode::SoSo => write!(f, "so-SO"),
            LanguageCode::SqAl => write!(f, "sq-AL"),
            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::UkUa => write!(f, "uk-UA"),
            LanguageCode::UzUz => write!(f, "uz-UZ"),
            LanguageCode::ViVn => write!(f, "vi-VN"),
            LanguageCode::ZhCn => write!(f, "zh-CN"),
            LanguageCode::ZhHk => write!(f, "zh-HK"),
            LanguageCode::ZhTw => write!(f, "zh-TW"),
            LanguageCode::ZuZa => write!(f, "zu-ZA"),
            LanguageCode::Unknown(value) => write!(f, "{value}"),
        }
    }
}
