deepl_openapi/models/
glossary_source_language.rs

1/*
2 * DeepL API Documentation
3 *
4 * The DeepL API provides programmatic access to DeepL’s machine translation technology.
5 *
6 * The version of the OpenAPI document: 2.7.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// GlossarySourceLanguage : The language in which the source texts in the glossary are specified.
12
13/// The language in which the source texts in the glossary are specified.
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
15pub enum GlossarySourceLanguage {
16    #[serde(rename = "de")]
17    De,
18    #[serde(rename = "en")]
19    En,
20    #[serde(rename = "es")]
21    Es,
22    #[serde(rename = "fr")]
23    Fr,
24    #[serde(rename = "ja")]
25    Ja,
26    #[serde(rename = "it")]
27    It,
28    #[serde(rename = "pl")]
29    Pl,
30    #[serde(rename = "nl")]
31    Nl,
32
33}
34
35impl ToString for GlossarySourceLanguage {
36    fn to_string(&self) -> String {
37        match self {
38            Self::De => String::from("de"),
39            Self::En => String::from("en"),
40            Self::Es => String::from("es"),
41            Self::Fr => String::from("fr"),
42            Self::Ja => String::from("ja"),
43            Self::It => String::from("it"),
44            Self::Pl => String::from("pl"),
45            Self::Nl => String::from("nl"),
46        }
47    }
48}
49
50impl Default for GlossarySourceLanguage {
51    fn default() -> GlossarySourceLanguage {
52        Self::De
53    }
54}
55
56
57
58