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
 */




#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Glossary {
    /// A unique ID assigned to a glossary.
    #[serde(rename = "glossary_id", skip_serializing_if = "Option::is_none")]
    pub glossary_id: Option<String>,
    /// Name associated with the glossary.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Indicates if the newly created glossary can already be used in `translate` requests. If the created glossary is not yet ready, you have to wait and check the `ready` status of the glossary before using it in a `translate` request.
    #[serde(rename = "ready", skip_serializing_if = "Option::is_none")]
    pub ready: Option<bool>,
    #[serde(rename = "source_lang", skip_serializing_if = "Option::is_none")]
    pub source_lang: Option<crate::models::GlossarySourceLanguage>,
    #[serde(rename = "target_lang", skip_serializing_if = "Option::is_none")]
    pub target_lang: Option<crate::models::GlossaryTargetLanguage>,
    /// The creation time of the glossary in the ISO 8601-1:2019 format (e.g.: `2021-08-03T14:16:18.329Z`).
    #[serde(rename = "creation_time", skip_serializing_if = "Option::is_none")]
    pub creation_time: Option<String>,
    /// The number of entries in the glossary.
    #[serde(rename = "entry_count", skip_serializing_if = "Option::is_none")]
    pub entry_count: Option<i32>,
}

impl Glossary {
    pub fn new() -> Glossary {
        Glossary {
            glossary_id: None,
            name: None,
            ready: None,
            source_lang: None,
            target_lang: None,
            creation_time: None,
            entry_count: None,
        }
    }
}