deepl_openapi/models/
glossary.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
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct Glossary {
16    /// A unique ID assigned to a glossary.
17    #[serde(rename = "glossary_id", skip_serializing_if = "Option::is_none")]
18    pub glossary_id: Option<String>,
19    /// Name associated with the glossary.
20    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
21    pub name: Option<String>,
22    /// 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.
23    #[serde(rename = "ready", skip_serializing_if = "Option::is_none")]
24    pub ready: Option<bool>,
25    #[serde(rename = "source_lang", skip_serializing_if = "Option::is_none")]
26    pub source_lang: Option<crate::models::GlossarySourceLanguage>,
27    #[serde(rename = "target_lang", skip_serializing_if = "Option::is_none")]
28    pub target_lang: Option<crate::models::GlossaryTargetLanguage>,
29    /// The creation time of the glossary in the ISO 8601-1:2019 format (e.g.: `2021-08-03T14:16:18.329Z`).
30    #[serde(rename = "creation_time", skip_serializing_if = "Option::is_none")]
31    pub creation_time: Option<String>,
32    /// The number of entries in the glossary.
33    #[serde(rename = "entry_count", skip_serializing_if = "Option::is_none")]
34    pub entry_count: Option<i32>,
35}
36
37impl Glossary {
38    pub fn new() -> Glossary {
39        Glossary {
40            glossary_id: None,
41            name: None,
42            ready: None,
43            source_lang: None,
44            target_lang: None,
45            creation_time: None,
46            entry_count: None,
47        }
48    }
49}
50
51