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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
use std::fmt::Debug;
use std::str::FromStr;
use crate::types::*;
use crate::tdkit;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SupergroupFullInfo {
#[doc(hidden)]
#[serde(rename(serialize = "@type", deserialize = "@type"))]
td_name: String,
description: Option<String>,
member_count: Option<i32>,
administrator_count: Option<i32>,
restricted_count: Option<i32>,
banned_count: Option<i32>,
can_get_members: Option<bool>,
can_set_username: Option<bool>,
can_set_sticker_set: Option<bool>,
can_view_statistics: Option<bool>,
is_all_history_available: Option<bool>,
sticker_set_id: Option<String>,
invite_link: Option<String>,
upgraded_from_basic_group_id: Option<i32>,
upgraded_from_max_message_id: Option<i64>,
}
impl Object for SupergroupFullInfo {}
impl RObject for SupergroupFullInfo {
#[doc(hidden)] fn td_name(&self) -> &'static str { "supergroupFullInfo" }
fn td_type(&self) -> RTDType { RTDType::SupergroupFullInfo }
fn to_json(&self) -> String { rtd_to_json!()(self) }
}
impl SupergroupFullInfo {
#[doc(hidden)] pub fn _new() -> Self {
Self {
td_name: "supergroupFullInfo".to_string(),
description: None,
member_count: None,
administrator_count: None,
restricted_count: None,
banned_count: None,
can_get_members: None,
can_set_username: None,
can_set_sticker_set: None,
can_view_statistics: None,
is_all_history_available: None,
sticker_set_id: None,
invite_link: None,
upgraded_from_basic_group_id: None,
upgraded_from_max_message_id: None,
}
}
pub fn description(&self) -> Option<String> { self.description.clone() }
#[doc(hidden)] pub fn _set_description(&mut self, description: String) -> &mut Self { self.description = Some(description); self }
pub fn member_count(&self) -> Option<i32> { self.member_count.clone() }
#[doc(hidden)] pub fn _set_member_count(&mut self, member_count: i32) -> &mut Self { self.member_count = Some(member_count); self }
pub fn administrator_count(&self) -> Option<i32> { self.administrator_count.clone() }
#[doc(hidden)] pub fn _set_administrator_count(&mut self, administrator_count: i32) -> &mut Self { self.administrator_count = Some(administrator_count); self }
pub fn restricted_count(&self) -> Option<i32> { self.restricted_count.clone() }
#[doc(hidden)] pub fn _set_restricted_count(&mut self, restricted_count: i32) -> &mut Self { self.restricted_count = Some(restricted_count); self }
pub fn banned_count(&self) -> Option<i32> { self.banned_count.clone() }
#[doc(hidden)] pub fn _set_banned_count(&mut self, banned_count: i32) -> &mut Self { self.banned_count = Some(banned_count); self }
pub fn can_get_members(&self) -> Option<bool> { self.can_get_members.clone() }
#[doc(hidden)] pub fn _set_can_get_members(&mut self, can_get_members: bool) -> &mut Self { self.can_get_members = Some(can_get_members); self }
pub fn can_set_username(&self) -> Option<bool> { self.can_set_username.clone() }
#[doc(hidden)] pub fn _set_can_set_username(&mut self, can_set_username: bool) -> &mut Self { self.can_set_username = Some(can_set_username); self }
pub fn can_set_sticker_set(&self) -> Option<bool> { self.can_set_sticker_set.clone() }
#[doc(hidden)] pub fn _set_can_set_sticker_set(&mut self, can_set_sticker_set: bool) -> &mut Self { self.can_set_sticker_set = Some(can_set_sticker_set); self }
pub fn can_view_statistics(&self) -> Option<bool> { self.can_view_statistics.clone() }
#[doc(hidden)] pub fn _set_can_view_statistics(&mut self, can_view_statistics: bool) -> &mut Self { self.can_view_statistics = Some(can_view_statistics); self }
pub fn is_all_history_available(&self) -> Option<bool> { self.is_all_history_available.clone() }
#[doc(hidden)] pub fn _set_is_all_history_available(&mut self, is_all_history_available: bool) -> &mut Self { self.is_all_history_available = Some(is_all_history_available); self }
pub fn sticker_set_id(&self) -> Option<String> { self.sticker_set_id.clone() }
#[doc(hidden)] pub fn _set_sticker_set_id(&mut self, sticker_set_id: String) -> &mut Self { self.sticker_set_id = Some(sticker_set_id); self }
pub fn invite_link(&self) -> Option<String> { self.invite_link.clone() }
#[doc(hidden)] pub fn _set_invite_link(&mut self, invite_link: String) -> &mut Self { self.invite_link = Some(invite_link); self }
pub fn upgraded_from_basic_group_id(&self) -> Option<i32> { self.upgraded_from_basic_group_id.clone() }
#[doc(hidden)] pub fn _set_upgraded_from_basic_group_id(&mut self, upgraded_from_basic_group_id: i32) -> &mut Self { self.upgraded_from_basic_group_id = Some(upgraded_from_basic_group_id); self }
pub fn upgraded_from_max_message_id(&self) -> Option<i64> { self.upgraded_from_max_message_id.clone() }
#[doc(hidden)] pub fn _set_upgraded_from_max_message_id(&mut self, upgraded_from_max_message_id: i64) -> &mut Self { self.upgraded_from_max_message_id = Some(upgraded_from_max_message_id); self }
pub fn from_json<S: AsRef<str>>(json: S) -> Option<Self> { from_json!()(json.as_ref()) }
}