1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
use std::fmt::Debug;
use std::str::FromStr;
use crate::types::*;
use crate::tdkit;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct InputFileGenerated {
#[doc(hidden)]
#[serde(rename(serialize = "@type", deserialize = "@type"))]
td_name: String,
original_path: Option<String>,
conversion: Option<String>,
expected_size: Option<i32>,
}
impl Object for InputFileGenerated {}
impl RObject for InputFileGenerated {
#[doc(hidden)] fn td_name(&self) -> &'static str { "inputFileGenerated" }
fn td_type(&self) -> RTDType { RTDType::InputFileGenerated }
fn to_json(&self) -> String { rtd_to_json!()(self) }
}
#[typetag::serde] impl InputFile for InputFileGenerated {}
impl InputFileGenerated {
#[doc(hidden)] pub fn _new() -> Self {
Self {
td_name: "inputFileGenerated".to_string(),
original_path: None,
conversion: None,
expected_size: None,
}
}
pub fn original_path(&self) -> Option<String> { self.original_path.clone() }
#[doc(hidden)] pub fn _set_original_path(&mut self, original_path: String) -> &mut Self { self.original_path = Some(original_path); self }
pub fn conversion(&self) -> Option<String> { self.conversion.clone() }
#[doc(hidden)] pub fn _set_conversion(&mut self, conversion: String) -> &mut Self { self.conversion = Some(conversion); self }
pub fn expected_size(&self) -> Option<i32> { self.expected_size.clone() }
#[doc(hidden)] pub fn _set_expected_size(&mut self, expected_size: i32) -> &mut Self { self.expected_size = Some(expected_size); self }
pub fn from_json<S: AsRef<str>>(json: S) -> Option<Self> { from_json!()(json.as_ref()) }
}