deepl-openapi 2.7.1

The DeepL API provides programmatic access to DeepL’s machine translation technology.
Documentation
/*
 * DeepL API Documentation
 *
 * The DeepL API provides programmatic access to DeepL’s machine translation technology.
 *
 * The version of the OpenAPI document: 2.7.0
 * 
 * Generated by: https://openapi-generator.tech
 */

/// GlossaryTargetLanguage : The language in which the target texts in the glossary are specified.

/// The language in which the target texts in the glossary are specified.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum GlossaryTargetLanguage {
    #[serde(rename = "de")]
    De,
    #[serde(rename = "en")]
    En,
    #[serde(rename = "es")]
    Es,
    #[serde(rename = "fr")]
    Fr,
    #[serde(rename = "ja")]
    Ja,
    #[serde(rename = "it")]
    It,
    #[serde(rename = "pl")]
    Pl,
    #[serde(rename = "nl")]
    Nl,

}

impl ToString for GlossaryTargetLanguage {
    fn to_string(&self) -> String {
        match self {
            Self::De => String::from("de"),
            Self::En => String::from("en"),
            Self::Es => String::from("es"),
            Self::Fr => String::from("fr"),
            Self::Ja => String::from("ja"),
            Self::It => String::from("it"),
            Self::Pl => String::from("pl"),
            Self::Nl => String::from("nl"),
        }
    }
}

impl Default for GlossaryTargetLanguage {
    fn default() -> GlossaryTargetLanguage {
        Self::De
    }
}