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
// WARNING: THIS CODE IS AUTOGENERATED.
// DO NOT EDIT!!!
use serde::{Deserialize, Serialize};
/// Describes actions that a non-administrator user is allowed to take in a chat.
/// <https://core.telegram.org/bots/api#chatpermissions>
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct ChatPermissions {
/// Optional. True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues
#[serde(skip_serializing_if = "Option::is_none")]
pub can_send_messages: Option<bool>,
/// Optional. True, if the user is allowed to send audios
#[serde(skip_serializing_if = "Option::is_none")]
pub can_send_audios: Option<bool>,
/// Optional. True, if the user is allowed to send documents
#[serde(skip_serializing_if = "Option::is_none")]
pub can_send_documents: Option<bool>,
/// Optional. True, if the user is allowed to send photos
#[serde(skip_serializing_if = "Option::is_none")]
pub can_send_photos: Option<bool>,
/// Optional. True, if the user is allowed to send videos
#[serde(skip_serializing_if = "Option::is_none")]
pub can_send_videos: Option<bool>,
/// Optional. True, if the user is allowed to send video notes
#[serde(skip_serializing_if = "Option::is_none")]
pub can_send_video_notes: Option<bool>,
/// Optional. True, if the user is allowed to send voice notes
#[serde(skip_serializing_if = "Option::is_none")]
pub can_send_voice_notes: Option<bool>,
/// Optional. True, if the user is allowed to send polls
#[serde(skip_serializing_if = "Option::is_none")]
pub can_send_polls: Option<bool>,
/// Optional. True, if the user is allowed to send animations, games, stickers and use inline bots
#[serde(skip_serializing_if = "Option::is_none")]
pub can_send_other_messages: Option<bool>,
/// Optional. True, if the user is allowed to add web page previews to their messages
#[serde(skip_serializing_if = "Option::is_none")]
pub can_add_web_page_previews: Option<bool>,
/// Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups
#[serde(skip_serializing_if = "Option::is_none")]
pub can_change_info: Option<bool>,
/// Optional. True, if the user is allowed to invite new users to the chat
#[serde(skip_serializing_if = "Option::is_none")]
pub can_invite_users: Option<bool>,
/// Optional. True, if the user is allowed to pin messages. Ignored in public supergroups
#[serde(skip_serializing_if = "Option::is_none")]
pub can_pin_messages: Option<bool>,
/// Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages
#[serde(skip_serializing_if = "Option::is_none")]
pub can_manage_topics: Option<bool>,
}