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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
use std::fmt::Debug;
use std::str::FromStr;
use crate::types::*;
use crate::tdkit;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ForwardMessages {
#[doc(hidden)]
#[serde(rename(serialize = "@type", deserialize = "@type"))]
td_name: String,
chat_id: Option<i64>,
from_chat_id: Option<i64>,
message_ids: Option<Vec<i64>>,
disable_notification: Option<bool>,
from_background: Option<bool>,
as_album: Option<bool>,
}
impl Object for ForwardMessages {}
impl RObject for ForwardMessages {
#[doc(hidden)] fn td_name(&self) -> &'static str { "forwardMessages" }
fn td_type(&self) -> RTDType { RTDType::ForwardMessages }
fn to_json(&self) -> String { rtd_to_json!()(self) }
}
impl Function for ForwardMessages {}
impl ForwardMessages {
#[doc(hidden)] pub fn _new() -> Self {
Self {
td_name: "forwardMessages".to_string(),
chat_id: None,
from_chat_id: None,
message_ids: None,
disable_notification: None,
from_background: None,
as_album: None,
}
}
pub fn chat_id(&self) -> Option<i64> { self.chat_id.clone() }
#[doc(hidden)] pub fn _set_chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn from_chat_id(&self) -> Option<i64> { self.from_chat_id.clone() }
#[doc(hidden)] pub fn _set_from_chat_id(&mut self, from_chat_id: i64) -> &mut Self { self.from_chat_id = Some(from_chat_id); self }
pub fn message_ids(&self) -> Option<Vec<i64>> { self.message_ids.clone() }
#[doc(hidden)] pub fn _set_message_ids(&mut self, message_ids: Vec<i64>) -> &mut Self { self.message_ids = Some(message_ids); self }
pub fn disable_notification(&self) -> Option<bool> { self.disable_notification.clone() }
#[doc(hidden)] pub fn _set_disable_notification(&mut self, disable_notification: bool) -> &mut Self { self.disable_notification = Some(disable_notification); self }
pub fn from_background(&self) -> Option<bool> { self.from_background.clone() }
#[doc(hidden)] pub fn _set_from_background(&mut self, from_background: bool) -> &mut Self { self.from_background = Some(from_background); self }
pub fn as_album(&self) -> Option<bool> { self.as_album.clone() }
#[doc(hidden)] pub fn _set_as_album(&mut self, as_album: bool) -> &mut Self { self.as_album = Some(as_album); self }
pub fn from_json<S: AsRef<str>>(json: S) -> Option<Self> { from_json!()(json.as_ref()) }
}